From patchwork Thu Jan 9 09:03:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Ivanov X-Patchwork-Id: 13932223 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 C75C3E77197 for ; Thu, 9 Jan 2025 09:06:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AATmeIywhPXpmS9/RGfjUbh+83T1nTe0P9ZqfpWyPjs=; b=4ryBMrkeP9VaBE/Qh3oCwz8DgO Ng1tfWbE6bW0PQmE/2K+bvcuO+neJBS3GSUk/xL0FJjafxdBczlrapl7JU3+oUQI2O5DwkhowYv6M awgqQi+gxZjXmNOlhu05siP2zrPVtynv+PvHBZSAzRBNdmsjBufWE40x8GMgwuJUc1K8Oh/0XWugz NBY7qADPCwiVQFAW9ooHL5jDnNQdEzwijkTPzBNmtA2KteqJZlr/Vrwf9QdvvoopDPTdk5YiJN+wC ziq1+f2zlspvLXNFjqorlt4THjP7iiaFf6N6OhXpmLD3enRqScrjvGsy+jmH1x3GOzMc1lKxwKjaG aAUevdPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tVoUr-0000000BGpN-4B8D; Thu, 09 Jan 2025 09:06:34 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tVoSS-0000000BGIs-0cdW for linux-arm-kernel@lists.infradead.org; Thu, 09 Jan 2025 09:04:05 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-385e1fcb0e1so330061f8f.2 for ; Thu, 09 Jan 2025 01:04:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736413441; x=1737018241; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AATmeIywhPXpmS9/RGfjUbh+83T1nTe0P9ZqfpWyPjs=; b=kkRE4AyF9PyUd6s4zR9+h+FD73TRTH0452h0oXzFS3ca5P6khs8kYp6txtOJVyfBTZ ndIW0wV+PfzQxGT4OSe95EDo8xe+6t/zoRouRiwMnFF2OBre06Q49oaCXKB41yDRK0GL cQuw8FdUDHRYtekD9y1+AdoDSKw0RaHmMnAOwGKEjLhF9K2TGbYCz3jR+AogQZGk0CRB xnmrimERiAi+v0kY4l7o/BaqEHMyxMaQCztImlNCEpKUaJUdTYOyFsEgBKxJK9r0IlPc U6ujf/mjbqVG8ITfx3sGf4Opoo312owuVGzFdq2dtWutays5iidtSS+FcZnHfU5rehJu irsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736413441; x=1737018241; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AATmeIywhPXpmS9/RGfjUbh+83T1nTe0P9ZqfpWyPjs=; b=vez7LqNKkfx7AVHHEVEElcmoKw27K4jWYT1QKEW7XCDBTjBvQLOjn3e/G0B0RzCJwb AVu/UpbqaYu0dB22QZHH1Py60mHkgVcWaTiqdD/K2I/pLjMyjaYT9UriEsVd2L6MYm9j tnyutMcYVLBmh+SmvvwjXRrfuAokDuRZsfbSc1G49rCf6LubeprHRWXsmFsKHGagdM2O FhG0zdK/jwKFjGyxvRBjQNQbyJqG+/r8ORBOPYQhoTZlbdjfehtmfnYbXot0W1nyG2HK eBZo9xTAdUEGt8xnXXy1oMqByvAgH5+0+3hbu0zjyRajqAQ9d84FYYZzDPCgwCN7QGwZ hSiA== X-Forwarded-Encrypted: i=1; AJvYcCVer31awUg0erzbU/gS/yiwamTMZXTKLsotiQFP11qJ26iAAGCSdPz/3vKn3ZaQuY0ysMTJ5fk16UDP6TgnTo3n@lists.infradead.org X-Gm-Message-State: AOJu0YzItkoRNcT1MdqGRah27DWCOVIz4FgvmPYToCPK9Y+ux7GNFTRt yQ1A+q+gUVuwMgR/l2g8vYwLOng+a5PhH46qHggMa5Y1QYTUsqpEiycUbg== X-Gm-Gg: ASbGncuvvEgzZG+ZfIts8O2Ccdl9c6gkFm2ulD2+3wG2Xk8CmBOEeqYb22w4r4CZ178 x0VkrMEs7ve89iKjMBLQuMfzKz1U0UaFMNTjy/zSLgcmcp82D+1pCzJyf2wWoK/h3BeaOPJ21aG S2JQbWr7gWvF16iREM8Kb/bMZ1bViACw0NWpaV21wJHfF3mhRW1SsNbopa/qhBF6ScK04KuARsn 3HkLh0EvFszgRhOdPmnlAyqvANOltti52yPx9+juq/Y8LOGJ5SHeU3HF+bCGsgpzWBsrIgk+65V gvAjTQ/utQhrYGpHMys= X-Google-Smtp-Source: AGHT+IGFcxivxoUtzo1x5HYX/6VWt8bW7xU3madFDp/wdFgOZ+AOfuU+UH/x3Sf7sd06GFipOX9rPQ== X-Received: by 2002:a05:6000:1f88:b0:38a:615c:8223 with SMTP id ffacd0b85a97d-38a872f69c7mr5075223f8f.10.1736413440930; Thu, 09 Jan 2025 01:04:00 -0800 (PST) Received: from ivaylo-T580.. (62-73-104-42.ip.btc-net.bg. [62.73.104.42]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e4b80b2sm1196692f8f.80.2025.01.09.01.03.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jan 2025 01:04:00 -0800 (PST) From: Ivaylo Ivanov To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , Sam Protsenko , Peter Griffin Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 1/4] dt-bindings: soc: samsung: usi: add USIv1 and samsung,exynos8895-usi Date: Thu, 9 Jan 2025 11:03:22 +0200 Message-ID: <20250109090325.595475-2-ivo.ivanov.ivanov1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250109090325.595475-1-ivo.ivanov.ivanov1@gmail.com> References: <20250109090325.595475-1-ivo.ivanov.ivanov1@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250109_010404_202245_C2886635 X-CRM114-Status: GOOD ( 20.63 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add new constants for choosing the additional USIv1 configuration modes in device tree. Those are further used in the USI driver to figure out which value to write into SW_CONF register. Modify the current USI IP-core bindings to include information about USIv1 and a compatible for exynos8895. In the original bindings commit, protocol mode definitions were named with the version of the supported USI (in this case, V2) with the idea of leaving enough room in the future for other versions of this block. This, however, is not how the modes should be modelled. The modes are not version specific and you should not be able to tell USI which version of a mode to use - that has to be handled in the driver - thus encoding this information in the binding is meaningless. Only one constant per mode is needed, so while we're at it, add new constants with the prefix USI_MODE and mark the old ones as depracated. Signed-off-by: Ivaylo Ivanov Reviewed-by: Krzysztof Kozlowski --- .../bindings/soc/samsung/exynos-usi.yaml | 99 ++++++++++++------- include/dt-bindings/soc/samsung,exynos-usi.h | 17 +++- 2 files changed, 79 insertions(+), 37 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml index 5b046932f..f711e23c0 100644 --- a/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml +++ b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml @@ -11,11 +11,21 @@ maintainers: - Krzysztof Kozlowski description: | - USI IP-core provides selectable serial protocol (UART, SPI or High-Speed I2C). - USI shares almost all internal circuits within each protocol, so only one - protocol can be chosen at a time. USI is modeled as a node with zero or more - child nodes, each representing a serial sub-node device. The mode setting - selects which particular function will be used. + The USI IP-core provides configurable support for serial protocols, enabling + different serial communication modes depending on the version. + + In USIv1, configurations are available to enable either one or two protocols + simultaneously in select combinations - High-Speed I2C0, High-Speed + I2C1, SPI, UART, High-Speed I2C0 and I2C1 or both High-Speed + I2C1 and UART. + + In USIv2, only one protocol can be active at a time, either UART, SPI, or + High-Speed I2C. + + The USI core shares internal circuits across protocols, meaning only the + selected configuration is active at any given time. USI is modeled as a node + with zero or more child nodes, each representing a serial sub-node device. The + mode setting selects which particular function will be used. properties: $nodename: @@ -31,6 +41,7 @@ properties: - const: samsung,exynos850-usi - enum: - samsung,exynos850-usi + - samsung,exynos8895-usi reg: maxItems: 1 @@ -64,7 +75,7 @@ properties: samsung,mode: $ref: /schemas/types.yaml#/definitions/uint32 - enum: [0, 1, 2, 3] + enum: [0, 1, 2, 3, 4, 5, 6] description: Selects USI function (which serial protocol to use). Refer to for valid USI mode values. @@ -101,37 +112,59 @@ required: - samsung,sysreg - samsung,mode -if: - properties: - compatible: - contains: - enum: - - samsung,exynos850-usi +allOf: + - if: + properties: + compatible: + contains: + enum: + - samsung,exynos850-usi + + then: + properties: + reg: + maxItems: 1 + + clocks: + items: + - description: Bus (APB) clock + - description: Operating clock for UART/SPI/I2C protocol + + clock-names: + maxItems: 2 + + samsung,mode: + enum: [0, 1, 2, 3] + + required: + - reg + - clocks + - clock-names + + - if: + properties: + compatible: + contains: + enum: + - samsung,exynos8895-usi -then: - properties: - reg: - maxItems: 1 + then: + properties: + reg: false - clocks: - items: - - description: Bus (APB) clock - - description: Operating clock for UART/SPI/I2C protocol + clocks: + items: + - description: Bus (APB) clock + - description: Operating clock for UART/SPI protocol - clock-names: - maxItems: 2 + clock-names: + maxItems: 2 - required: - - reg - - clocks - - clock-names + samsung,clkreq-on: false -else: - properties: - reg: false - clocks: false - clock-names: false - samsung,clkreq-on: false + required: + - clocks + - clock-names additionalProperties: false @@ -144,7 +177,7 @@ examples: compatible = "samsung,exynos850-usi"; reg = <0x138200c0 0x20>; samsung,sysreg = <&sysreg_peri 0x1010>; - samsung,mode = ; + samsung,mode = ; samsung,clkreq-on; /* needed for UART mode */ #address-cells = <1>; #size-cells = <1>; diff --git a/include/dt-bindings/soc/samsung,exynos-usi.h b/include/dt-bindings/soc/samsung,exynos-usi.h index a01af169d..b46de214d 100644 --- a/include/dt-bindings/soc/samsung,exynos-usi.h +++ b/include/dt-bindings/soc/samsung,exynos-usi.h @@ -9,9 +9,18 @@ #ifndef __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H #define __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H -#define USI_V2_NONE 0 -#define USI_V2_UART 1 -#define USI_V2_SPI 2 -#define USI_V2_I2C 3 +#define USI_MODE_NONE 0 +#define USI_MODE_UART 1 +#define USI_MODE_SPI 2 +#define USI_MODE_I2C 3 +#define USI_MODE_I2C1 4 +#define USI_MODE_I2C0_1 5 +#define USI_MODE_UART_I2C1 6 + +/* Deprecated */ +#define USI_V2_NONE USI_MODE_NONE +#define USI_V2_UART USI_MODE_UART +#define USI_V2_SPI USI_MODE_SPI +#define USI_V2_I2C USI_MODE_I2C #endif /* __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H */ From patchwork Thu Jan 9 09:03:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Ivanov X-Patchwork-Id: 13932224 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 2BB4EE77197 for ; Thu, 9 Jan 2025 09:08:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pGvZ+f1Zyma1bBzTOIhQdIYYMP/e8EzANI82dsN3dLw=; b=sVo3CNVYiZSdVp4t9dn6/ZxeMu abgAqzdBtadrVrt/iERiFsyhXI3U/ni/bCqEgsymqJ0x4WfNHBj/TiGDQ5HxaDT7VYesn3eF1OTpe bqwAg5NlAB0ClCqmltmPaI9tDHgRlOFNp2ugkPnPZAHbmJfNaSkcT2nSWCshvXbWxER6Po9O76iOV sj2owXhCOekUoy+WNT1G9qpJdNvdB8j6ZpZJpgd/cZzTyqeD0HjN6lMn9yxI+oG4SjboctXTDJ7AX wxz5m8BSs1cana+cT/Qb7L6TS88XRrCnwYEPOFZ/Mb0yjAiedVCxp/cI07crlfoRlbwa6ZXW+zyzN 5aie1GIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tVoW3-0000000BHBe-35TA; Thu, 09 Jan 2025 09:07:47 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tVoSS-0000000BGJ8-24YT for linux-arm-kernel@lists.infradead.org; Thu, 09 Jan 2025 09:04:05 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4363ae65100so7337145e9.0 for ; Thu, 09 Jan 2025 01:04:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736413443; x=1737018243; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pGvZ+f1Zyma1bBzTOIhQdIYYMP/e8EzANI82dsN3dLw=; b=R6C7RImXOWDyZFz5ycsD0RywmWBzNu/t4lrYbaMURSA9WElQRsvrQbgY/SEzD3a6uE oEPyjVw+H+GDDn8+iMinQsfKvkzrTbk1s1KyFUcPYsN5t5G4Ha4aUsiIA3PIe8jsFkpg aM4HjM+q0uPJEVjczn4reQUep//P1LbB/RSy+kddfzjdHUv/lV++27RT7hf8+t4/pGLB QQcjDfo6sdHB0PcPCQ6ItzjM05RyDdQNY4YA97EHGfM3mr9t0SlQGE60AP81iLTtbfNP Z4W5qmUjrJfFY+5QxRzz1vHrwTJTkmQ0r6Ycg61hUcOLHJINrshly7oE4hmXHwFaWs7Y ub0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736413443; x=1737018243; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pGvZ+f1Zyma1bBzTOIhQdIYYMP/e8EzANI82dsN3dLw=; b=ldH7NVF59aeAtT1p/axileSjud1je9qn6UMxDPW7T/QdQd5FGrG9B5BKz9d7D5Uieo tyARFeCD7TNMver/Hht0JAVH1NleXlxUJT99vm06WtInfHHPPpnRajE72n2hfLOv7twp ZlS3erlvU00XMtP+9FuMnB2e35un6ZqTcCgyEwWvjquXiNuyQ5SYQYycre56w/AJ6hCk avCxx5BDa2bj3qNRCBb79qLWQ65cbmpsX8UtnDe1L3BXjSLGx9wWGxJyUgieV5r+2bMw +kanoVGoX0rrU1lKsJQP3X/BIF3ClyIrj5likQwpeOPerhc4wYlHK9Wq8mqNsMKjA6r9 VQBA== X-Forwarded-Encrypted: i=1; AJvYcCXKee7q73SK0sUw+irPFLNaVrpO3mvqKGYWPdePr1bnhDN8DQ97Gp72zuUufixaE22x5wbfqWPqWwEPlRbEVeIo@lists.infradead.org X-Gm-Message-State: AOJu0Yx5ImywmqeZA/OaWAfF31ld3AO3DxSa2m6yuoJD2UsYBIlmvMmo 9IXF5GRe4q0IZGc9w8gkbKDeT01WggHElmbpDYy8uRoegIVkfu9J X-Gm-Gg: ASbGncu/nHVJE8MlOXMCYFCodoyzWGJnygOLEaN2svMCAyH8+XV+UMJReYWou9od6Be kYJGroTq6YwSV/vl5gerqjvSe/BBd6ImiThfQpxohrP+0JLsQ4pysutvlQ2duPALUsF+SPE0fAk hFJLDo/tmvDH7t7GwfQe25Gca3NftclYVCHZkAlNRgd5/bWtGo43RSz+ZUjadRdmsk1rfyC7QOQ He2ypP/XuXCge/5hrgECvqjhMbAK+jg43Hvxoa6IiDzLMBg2aZS9dDKlqOMSijz+U8H0AWmZIt6 F7iF8/N9oI0RCWswUOM= X-Google-Smtp-Source: AGHT+IG+S1p+g9llpREUzQnFzEQznCPzgiIz8QVHak3a3fJsQBKY3XpKOsmNBaUFThwuDVvhWCgyDg== X-Received: by 2002:adf:9796:0:b0:38a:88f8:aabb with SMTP id ffacd0b85a97d-38a88f8acdbmr3467553f8f.55.1736413442625; Thu, 09 Jan 2025 01:04:02 -0800 (PST) Received: from ivaylo-T580.. (62-73-104-42.ip.btc-net.bg. [62.73.104.42]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e4b80b2sm1196692f8f.80.2025.01.09.01.04.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jan 2025 01:04:01 -0800 (PST) From: Ivaylo Ivanov To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , Sam Protsenko , Peter Griffin Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/4] soc: samsung: usi: add a routine for unconfiguring the ip Date: Thu, 9 Jan 2025 11:03:23 +0200 Message-ID: <20250109090325.595475-3-ivo.ivanov.ivanov1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250109090325.595475-1-ivo.ivanov.ivanov1@gmail.com> References: <20250109090325.595475-1-ivo.ivanov.ivanov1@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250109_010404_530316_5DE59DE8 X-CRM114-Status: GOOD ( 12.98 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a devm_add_action_or_reset() routine for unconfiguring the USI IP block whenever the device gets removed. Signed-off-by: Ivaylo Ivanov --- drivers/soc/samsung/exynos-usi.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/soc/samsung/exynos-usi.c b/drivers/soc/samsung/exynos-usi.c index 114352695..4b84f481b 100644 --- a/drivers/soc/samsung/exynos-usi.c +++ b/drivers/soc/samsung/exynos-usi.c @@ -174,6 +174,23 @@ static int exynos_usi_configure(struct exynos_usi *usi) return 0; } +static void exynos_usi_unconfigure(void *data) +{ + struct exynos_usi *usi = data; + u32 val; + + /* Make sure that we've stopped providing the clock to USI IP */ + val = readl(usi->regs + USI_OPTION); + val &= ~USI_OPTION_CLKREQ_ON; + val |= ~USI_OPTION_CLKSTOP_ON; + writel(val, usi->regs + USI_OPTION); + + /* Set USI block state to reset */ + val = readl(usi->regs + USI_CON); + val |= USI_CON_RESET; + writel(val, usi->regs + USI_CON); +} + static int exynos_usi_parse_dt(struct device_node *np, struct exynos_usi *usi) { int ret; @@ -251,6 +268,10 @@ static int exynos_usi_probe(struct platform_device *pdev) return PTR_ERR(usi->regs); } + ret = devm_add_action_or_reset(&pdev->dev, exynos_usi_unconfigure, usi); + if (ret) + return ret; + ret = exynos_usi_configure(usi); if (ret) return ret; From patchwork Thu Jan 9 09:03:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Ivanov X-Patchwork-Id: 13932225 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 9EEC2E77197 for ; Thu, 9 Jan 2025 09:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZCpmmMifUuuJ9+tjCbBNOmX8W+9L1QauRjSWCr7/+E4=; b=zQi4CL1JVrT76qEkSLR7FsLI5l 2+4SOKK4r4vW7mi3xmfQM6TMVp7GUO+HSvLNvyVGbUkCJLDhsiK0qbPbGo2cBnwWalXBvxZeIQAEl iku9V787/DV26d5cGfsFpJCpnWKWQ0N8sd2wq/IEIWnnwzf0cPbHDDvJJwDde3GV9r40wH/JwhkOu uAEpzqvqmRKPy2DA+lv1wRXWeQBrxseXK4nyXznCX/CVlchO2oxT0sZ0kfYuUo5wTsO5pqwyTiy72 NlxtKGp/gA7fGl3zjSzI79LI9791UYv6zrYFp14wzWLuy/MI4ct2iSpp0K8dykSL9o5lYo27N5KQG Fdwrc+/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tVoXG-0000000BHRr-1nd1; Thu, 09 Jan 2025 09:09:02 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tVoSU-0000000BGJy-1plz for linux-arm-kernel@lists.infradead.org; Thu, 09 Jan 2025 09:04:07 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4368a293339so8223435e9.3 for ; Thu, 09 Jan 2025 01:04:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736413445; x=1737018245; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZCpmmMifUuuJ9+tjCbBNOmX8W+9L1QauRjSWCr7/+E4=; b=CkgahICeYUz8i8RcZ9JRfXTrEWHF9Ag0EoQ4O4+wu7TIbyR+TV/1HR/K3uCrIth6aM FHF1XuowJ+M82RGAWwi01OBTUZ9XKk8FBaAesFEQ8ATO1b78Vb6yRqJWIYlPIjZBdhSs 1HKzdbQnB9pr+EU6HE4wGS4VXVoWwwOoB3Avx+uhIFUvFccDcAOQoS0+xz82OaeOUC/b bwm1crHQIxs9b4pFSg8rvhrygc/LsSlEJcrst8XzowebKjzFTSh7IfWw/BOj5IJ94GQQ JyDDbAyXsF1BRMEAocshKZVXwCXsxWR4O//7Va9ddZLQmp1LSkw5VQeLSsmpyIkHOmBY uynA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736413445; x=1737018245; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZCpmmMifUuuJ9+tjCbBNOmX8W+9L1QauRjSWCr7/+E4=; b=HnqC+UyAtUeSe3RXdyUnIjKO7VlpLHBCzcprDr3Z2G0S3+aGmUzQzBDZEz3gtOqL31 DOkh+jXgaydInuSgDDTB+4hGYLo+8AZKPVupHVTqnkLJX0EyS0+tPQspWZQsMusHkZyj y0kM6wPUYDvtCEQhNUy8j0T6Qw78bFgmYm9PLOEezwvCLKcwmGzd/FNQr2T86oVaW3Nt VXhn2EXW28W7yp4WSlRf0fR77w7jVkmUjjwEhXjmrIVnP0HtHlR/9XyeIurKzYqCgHrM A+E76wa2C4CH7pN68nHxArUMsnN8LWF43aD6Vb2eArk/UGaQ3TGZXNT3NUlppxRhe3sf Qtfg== X-Forwarded-Encrypted: i=1; AJvYcCV9ZS/FkVAeLcbzCZ3CSO+42BawcbE3FLEFDU/uoitEkYxXKto98rigAypEz++Qtr+i8xcRYrNiuIQLvw+Q+8ln@lists.infradead.org X-Gm-Message-State: AOJu0YyI9IUfHPVr/xvDpg571cFG0TfPAM+nEG/SraiTPJ9HZNwu9J23 iB+53hJpRkz32uVD4TuoO0rPMPWrIQWukX7qnDyM7pONBuT1uGX1 X-Gm-Gg: ASbGnctYNb/LdnMMO9XNEM1S+QNfdH5zZeaN7aMI55DXp0U9+dwktFET1y6yddSlFP9 jLrFs+0mF14qKB6H5mWS3fSkl3WKPE6CXx6wI4TunbZZlL7festj6Ndoc/DRBLzROESJ3xrC6ia lC7nDK1EPT0PiLA7WlZ4i7BXbTDQnP3Kq+biJ2bI0Da/pQqK/EKHn+PA+wNTuKDg5BnMeyfJr06 ESx3FHg/QKhXolMg2P9oRhaSVPpGt6Yg1RLqk4A0sJzDZhoeRl1ZEyiWxUayfOYmET1Mw1s7TiG RC5ukKXf0AX9T4ut/1E= X-Google-Smtp-Source: AGHT+IEaR7svee5aX+rCiKsRbOx8w2O2GiuW0Y3cJUpXD1c0W5ZNdo+enti2VyZXNrnvGKRyED0uZw== X-Received: by 2002:a5d:6da2:0:b0:385:fc70:7f6 with SMTP id ffacd0b85a97d-38a872fadf3mr5135537f8f.7.1736413444389; Thu, 09 Jan 2025 01:04:04 -0800 (PST) Received: from ivaylo-T580.. (62-73-104-42.ip.btc-net.bg. [62.73.104.42]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e4b80b2sm1196692f8f.80.2025.01.09.01.04.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jan 2025 01:04:03 -0800 (PST) From: Ivaylo Ivanov To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , Sam Protsenko , Peter Griffin Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 3/4] soc: samsung: usi: implement support for USIv1 and exynos8895 Date: Thu, 9 Jan 2025 11:03:24 +0200 Message-ID: <20250109090325.595475-4-ivo.ivanov.ivanov1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250109090325.595475-1-ivo.ivanov.ivanov1@gmail.com> References: <20250109090325.595475-1-ivo.ivanov.ivanov1@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250109_010406_482550_0E4F8351 X-CRM114-Status: GOOD ( 21.45 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org USIv1 IP-core is found on some ARM64 Exynos SoCs (like Exynos8895) and provides selectable serial protocols (one of: HSI2C0, HSI2C1, HSI2C0_1, SPI, UART, UART_HSI2C1). USIv1, unlike USIv2, doesn't have any known register map. Underlying protocols that it implements have no offset, like with Exynos850. Desired protocol can be chosen via SW_CONF register from System Register block of the same domain as USI. In order to select a particular protocol, the protocol has to be selected via the System Register. Unlike USIv2, there's no need for any setup before the given protocol becomes accessible apart from enabling the APB clock and the protocol operating clock. Modify the existing driver in order to allow USIv1 instances in Exynos8895 to probe and set their protocol. While we're at it, make use of the new mode constants in place of the old ones. Signed-off-by: Ivaylo Ivanov --- drivers/soc/samsung/exynos-usi.c | 71 ++++++++++++++++++++++++++------ 1 file changed, 58 insertions(+), 13 deletions(-) diff --git a/drivers/soc/samsung/exynos-usi.c b/drivers/soc/samsung/exynos-usi.c index 4b84f481b..8a56d6040 100644 --- a/drivers/soc/samsung/exynos-usi.c +++ b/drivers/soc/samsung/exynos-usi.c @@ -16,6 +16,18 @@ #include +/* USIv1: System Register: SW_CONF register bits */ +#define USI_V1_SW_CONF_NONE 0x0 +#define USI_V1_SW_CONF_I2C0 0x1 +#define USI_V1_SW_CONF_I2C1 0x2 +#define USI_V1_SW_CONF_I2C0_1 0x3 +#define USI_V1_SW_CONF_SPI 0x4 +#define USI_V1_SW_CONF_UART 0x8 +#define USI_V1_SW_CONF_UART_I2C1 0xa +#define USI_V1_SW_CONF_MASK (USI_V1_SW_CONF_I2C0 | USI_V1_SW_CONF_I2C1 | \ + USI_V1_SW_CONF_I2C0_1 | USI_V1_SW_CONF_SPI | \ + USI_V1_SW_CONF_UART | USI_V1_SW_CONF_UART_I2C1) + /* USIv2: System Register: SW_CONF register bits */ #define USI_V2_SW_CONF_NONE 0x0 #define USI_V2_SW_CONF_UART BIT(0) @@ -34,7 +46,8 @@ #define USI_OPTION_CLKSTOP_ON BIT(2) enum exynos_usi_ver { - USI_VER2 = 2, + USI_VER1 = 0, + USI_VER2, }; struct exynos_usi_variant { @@ -66,19 +79,39 @@ struct exynos_usi_mode { unsigned int val; /* mode register value */ }; -static const struct exynos_usi_mode exynos_usi_modes[] = { - [USI_V2_NONE] = { .name = "none", .val = USI_V2_SW_CONF_NONE }, - [USI_V2_UART] = { .name = "uart", .val = USI_V2_SW_CONF_UART }, - [USI_V2_SPI] = { .name = "spi", .val = USI_V2_SW_CONF_SPI }, - [USI_V2_I2C] = { .name = "i2c", .val = USI_V2_SW_CONF_I2C }, +#define USI_MODES_MAX (USI_MODE_UART_I2C1 + 1) +static const struct exynos_usi_mode exynos_usi_modes[][USI_MODES_MAX] = { + [USI_VER1] = { + [USI_MODE_NONE] = { .name = "none", .val = USI_V1_SW_CONF_NONE }, + [USI_MODE_UART] = { .name = "uart", .val = USI_V1_SW_CONF_UART }, + [USI_MODE_SPI] = { .name = "spi", .val = USI_V1_SW_CONF_SPI }, + [USI_MODE_I2C] = { .name = "i2c", .val = USI_V1_SW_CONF_I2C0 }, + [USI_MODE_I2C1] = { .name = "i2c1", .val = USI_V1_SW_CONF_I2C1 }, + [USI_MODE_I2C0_1] = { .name = "i2c0_1", .val = USI_V1_SW_CONF_I2C0_1 }, + [USI_MODE_UART_I2C1] = { .name = "uart_i2c1", .val = USI_V1_SW_CONF_UART_I2C1 }, + }, [USI_VER2] = { + [USI_MODE_NONE] = { .name = "none", .val = USI_V2_SW_CONF_NONE }, + [USI_MODE_UART] = { .name = "uart", .val = USI_V2_SW_CONF_UART }, + [USI_MODE_SPI] = { .name = "spi", .val = USI_V2_SW_CONF_SPI }, + [USI_MODE_I2C] = { .name = "i2c", .val = USI_V2_SW_CONF_I2C }, + }, }; static const char * const exynos850_usi_clk_names[] = { "pclk", "ipclk" }; static const struct exynos_usi_variant exynos850_usi_data = { .ver = USI_VER2, .sw_conf_mask = USI_V2_SW_CONF_MASK, - .min_mode = USI_V2_NONE, - .max_mode = USI_V2_I2C, + .min_mode = USI_MODE_NONE, + .max_mode = USI_MODE_I2C, + .num_clks = ARRAY_SIZE(exynos850_usi_clk_names), + .clk_names = exynos850_usi_clk_names, +}; + +static const struct exynos_usi_variant exynos8895_usi_data = { + .ver = USI_VER1, + .sw_conf_mask = USI_V1_SW_CONF_MASK, + .min_mode = USI_MODE_NONE, + .max_mode = USI_MODE_UART_I2C1, .num_clks = ARRAY_SIZE(exynos850_usi_clk_names), .clk_names = exynos850_usi_clk_names, }; @@ -87,6 +120,9 @@ static const struct of_device_id exynos_usi_dt_match[] = { { .compatible = "samsung,exynos850-usi", .data = &exynos850_usi_data, + }, { + .compatible = "samsung,exynos8895-usi", + .data = &exynos8895_usi_data, }, { } /* sentinel */ }; @@ -109,14 +145,15 @@ static int exynos_usi_set_sw_conf(struct exynos_usi *usi, size_t mode) if (mode < usi->data->min_mode || mode > usi->data->max_mode) return -EINVAL; - val = exynos_usi_modes[mode].val; + val = exynos_usi_modes[usi->data->ver][mode].val; ret = regmap_update_bits(usi->sysreg, usi->sw_conf, usi->data->sw_conf_mask, val); if (ret) return ret; usi->mode = mode; - dev_dbg(usi->dev, "protocol: %s\n", exynos_usi_modes[usi->mode].name); + dev_dbg(usi->dev, "protocol: %s\n", + exynos_usi_modes[usi->data->ver][usi->mode].name); return 0; } @@ -168,10 +205,13 @@ static int exynos_usi_configure(struct exynos_usi *usi) if (ret) return ret; - if (usi->data->ver == USI_VER2) - return exynos_usi_enable(usi); + if (usi->data->ver == USI_VER1) + ret = clk_bulk_prepare_enable(usi->data->num_clks, + usi->clks); + else if (usi->data->ver == USI_VER2) + ret = exynos_usi_enable(usi); - return 0; + return ret; } static void exynos_usi_unconfigure(void *data) @@ -179,6 +219,11 @@ static void exynos_usi_unconfigure(void *data) struct exynos_usi *usi = data; u32 val; + if (usi->data->ver == USI_VER1) { + clk_bulk_disable_unprepare(usi->data->num_clks, usi->clks); + return; + } + /* Make sure that we've stopped providing the clock to USI IP */ val = readl(usi->regs + USI_OPTION); val &= ~USI_OPTION_CLKREQ_ON; From patchwork Thu Jan 9 09:03:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Ivanov X-Patchwork-Id: 13932235 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 1B408E77197 for ; Thu, 9 Jan 2025 09:10:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZBre3tfK9eNw0D6ztWoJ2B8wDlLW7jzGaVQPJWiVrhc=; b=nM+tUDONhUlW8ksnAIo3dSzWH5 dUvQddv2STjdPCQSMf6ueHTTwL75kLF//r2/zk2ddsW1dUFpTI7iqKmr0YOCyRorY0eOfbWQ7B6uV aMVDH3y5rOU/7FUHNm25XmkN8+ZJfr8LHLGTsotrBo5k70JuDQa/gbHrmX+vSxiz2h6Tc5kaFnzsp ORi5Ku4eeZwiBk+ajJYKMqnl3xkJbGRT0KkDowCDSyZJgwx9/mbUrCaAHJmDcQrIdnkNZSTVirnGw V5Ixa40fNwF/5/7FDRzeIQ6k0qsUJsh0e67ugdpDIZjcjuG/FjyBM9/HQZvXU1udaW9zjxz0fnD0Z PRtTIROQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tVoYS-0000000BHgw-0gM7; Thu, 09 Jan 2025 09:10:16 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tVoSV-0000000BGKK-2bR5 for linux-arm-kernel@lists.infradead.org; Thu, 09 Jan 2025 09:04:09 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-436a39e4891so4933775e9.1 for ; Thu, 09 Jan 2025 01:04:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736413446; x=1737018246; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZBre3tfK9eNw0D6ztWoJ2B8wDlLW7jzGaVQPJWiVrhc=; b=feMO0cN6qZmT0C0mJpyNvtTSbHfL/nXwJrabpq4aKWpzZeDumk2Zp9VoG943Y9Lnoo 9YaI53Q7kXAJ74wxoMurhtvwv3RU0Nr72+G+tjzETtBqLS6nVInmLHLf6AsrxUx9BDLZ K3bmvVhvx0us97ZnFUpWpVsx5PfyAOkbBmaPlx8wB2n7TkH3mwUjSk29xcoKgmAsGmWV gTovotqYK9WQq5t6BjIZ4e/McuUpbfXj8C4oojnQjv3byFBPN2bqjgSSkxxX4uQM1URp wCHdcQYMMlp+dIsi9XGoI/13YMgnLIoiuM6aRZPtUr42GoBV7imErM3Ri8Sog+UObOBC 850Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736413446; x=1737018246; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZBre3tfK9eNw0D6ztWoJ2B8wDlLW7jzGaVQPJWiVrhc=; b=SPd5If2rv+MlGwk+6qphKt7xt2fRtmcj0VqrVmH3z3xyB78S1A7ufYrJ2HE5LgQt6R zyhe8MWAkXup/Cgo8LSVLjGQLvTIV0lOkMBqgBrqmjsciAGI6LLc3RyJxhcoxLtXtnrf Jtk2rv3q/uJjRnh5q4gVyQHESJLNEWIFdnmzC8fjiRWfGG0zatIZYd3iE/vJyBokQoKx cqzwdyElIY0/Ci3tR3Cf6PQKdoua8e3f0UTBpREREYcxaqxKDqrOaPlBA/23LhnNq2VZ Si1HG/JA13X3NEq5hDNjM03bmkZarbTFfE9PF+gGEZba70ng6dIyHFcyKQoArlVRULvr n5MQ== X-Forwarded-Encrypted: i=1; AJvYcCU72JzqUH5lBJnEJcrGLXz5S68EKUoavn3CTZluGA6KpaVedgb07n0IolM97tEWZ4YpSAJ+ORCCUOQ4c7WbDLPC@lists.infradead.org X-Gm-Message-State: AOJu0YzYQoXTwxDo8TYl/T6SsjtjThxs+HOy8lp6tsW909sLF8ExiOm8 YtHsrGsO//Yxhiex0smT9vBYptGAMRJicIOObDkFvk//qc9dIpkD X-Gm-Gg: ASbGncuPUUbFzA/56LJa4l4uBvc/AmV/eG5Qx3mee+p8QD/Ni2pLUj2f+K4iWrVT8bC g14gM2x3fZaLvOTxBYmMKKe8Gu868wWigQib4rqgxxpVfA3c8eCLsEvxaWonR9Vqar55kT0PAbA LScv7vLzTUEXVrWsdYw+UIxLFW5/4NjNe1Cr0SJ3AuJ5h8UbKhPs9X86KHMF0xj8MoO7JEmCb8C drbFUo9SM9bORsmtLBW9pOdG3FjSb79FSjtnOP6rSfLZakWhzSDfMiWPFHBHZ42NH7H2EXpcqqs DQlrfniAXdbmtlMDMRc= X-Google-Smtp-Source: AGHT+IGx574cDudtAcm0a67dcSm2ibn5dzaHhj/kf09L4ekpC1X5fqoTRc+FNu5M1rnroXGd/0Twiw== X-Received: by 2002:a5d:6d84:0:b0:385:e8ff:b9c9 with SMTP id ffacd0b85a97d-38a87308cbfmr4341559f8f.42.1736413445705; Thu, 09 Jan 2025 01:04:05 -0800 (PST) Received: from ivaylo-T580.. (62-73-104-42.ip.btc-net.bg. [62.73.104.42]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e4b80b2sm1196692f8f.80.2025.01.09.01.04.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jan 2025 01:04:05 -0800 (PST) From: Ivaylo Ivanov To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , Sam Protsenko , Peter Griffin Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 4/4] arm64: dts: exynos: update all samsung,mode constants Date: Thu, 9 Jan 2025 11:03:25 +0200 Message-ID: <20250109090325.595475-5-ivo.ivanov.ivanov1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250109090325.595475-1-ivo.ivanov.ivanov1@gmail.com> References: <20250109090325.595475-1-ivo.ivanov.ivanov1@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250109_010407_676367_B8294F70 X-CRM114-Status: GOOD ( 11.71 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Update all samsung,mode property values to account for renaming USI_V2 constants to USI_MODE in the bindings. Signed-off-by: Ivaylo Ivanov --- arch/arm64/boot/dts/exynos/exynos850.dtsi | 14 +++--- arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 48 +++++++++---------- .../arm64/boot/dts/exynos/exynosautov920.dtsi | 2 +- .../boot/dts/exynos/google/gs101-oriole.dts | 4 +- arch/arm64/boot/dts/exynos/google/gs101.dtsi | 2 +- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/arch/arm64/boot/dts/exynos/exynos850.dtsi b/arch/arm64/boot/dts/exynos/exynos850.dtsi index f1c8b4613..cb55015c8 100644 --- a/arch/arm64/boot/dts/exynos/exynos850.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos850.dtsi @@ -651,7 +651,7 @@ usi_uart: usi@138200c0 { compatible = "samsung,exynos850-usi"; reg = <0x138200c0 0x20>; samsung,sysreg = <&sysreg_peri 0x1010>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -677,7 +677,7 @@ usi_hsi2c_0: usi@138a00c0 { compatible = "samsung,exynos850-usi"; reg = <0x138a00c0 0x20>; samsung,sysreg = <&sysreg_peri 0x1020>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -706,7 +706,7 @@ usi_hsi2c_1: usi@138b00c0 { compatible = "samsung,exynos850-usi"; reg = <0x138b00c0 0x20>; samsung,sysreg = <&sysreg_peri 0x1030>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -735,7 +735,7 @@ usi_hsi2c_2: usi@138c00c0 { compatible = "samsung,exynos850-usi"; reg = <0x138c00c0 0x20>; samsung,sysreg = <&sysreg_peri 0x1040>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -764,7 +764,7 @@ usi_spi_0: usi@139400c0 { compatible = "samsung,exynos850-usi"; reg = <0x139400c0 0x20>; samsung,sysreg = <&sysreg_peri 0x1050>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -796,7 +796,7 @@ usi_cmgp0: usi@11d000c0 { compatible = "samsung,exynos850-usi"; reg = <0x11d000c0 0x20>; samsung,sysreg = <&sysreg_cmgp 0x2000>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -855,7 +855,7 @@ usi_cmgp1: usi@11d200c0 { compatible = "samsung,exynos850-usi"; reg = <0x11d200c0 0x20>; samsung,sysreg = <&sysreg_cmgp 0x2010>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi index b36292a7d..66628cb32 100644 --- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi +++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi @@ -442,7 +442,7 @@ usi_0: usi@103000c0 { "samsung,exynos850-usi"; reg = <0x103000c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1000>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -505,7 +505,7 @@ usi_i2c_0: usi@103100c0 { "samsung,exynos850-usi"; reg = <0x103100c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1004>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -534,7 +534,7 @@ usi_1: usi@103200c0 { "samsung,exynos850-usi"; reg = <0x103200c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1008>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -597,7 +597,7 @@ usi_i2c_1: usi@103300c0 { "samsung,exynos850-usi"; reg = <0x103300c0 0x20>; samsung,sysreg = <&syscon_peric0 0x100c>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -626,7 +626,7 @@ usi_2: usi@103400c0 { "samsung,exynos850-usi"; reg = <0x103400c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1010>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -689,7 +689,7 @@ usi_i2c_2: usi@103500c0 { "samsung,exynos850-usi"; reg = <0x103500c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1014>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -718,7 +718,7 @@ usi_3: usi@103600c0 { "samsung,exynos850-usi"; reg = <0x103600c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1018>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -781,7 +781,7 @@ usi_i2c_3: usi@103700c0 { "samsung,exynos850-usi"; reg = <0x103700c0 0x20>; samsung,sysreg = <&syscon_peric0 0x101c>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -810,7 +810,7 @@ usi_4: usi@103800c0 { "samsung,exynos850-usi"; reg = <0x103800c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1020>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -873,7 +873,7 @@ usi_i2c_4: usi@103900c0 { "samsung,exynos850-usi"; reg = <0x103900c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1024>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -902,7 +902,7 @@ usi_5: usi@103a00c0 { "samsung,exynos850-usi"; reg = <0x103a00c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1028>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -965,7 +965,7 @@ usi_i2c_5: usi@103b00c0 { "samsung,exynos850-usi"; reg = <0x103b00c0 0x20>; samsung,sysreg = <&syscon_peric0 0x102c>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -994,7 +994,7 @@ usi_6: usi@109000c0 { "samsung,exynos850-usi"; reg = <0x109000c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1000>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1057,7 +1057,7 @@ usi_i2c_6: usi@109100c0 { "samsung,exynos850-usi"; reg = <0x109100c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1004>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1086,7 +1086,7 @@ usi_7: usi@109200c0 { "samsung,exynos850-usi"; reg = <0x109200c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1008>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1149,7 +1149,7 @@ usi_i2c_7: usi@109300c0 { "samsung,exynos850-usi"; reg = <0x109300c0 0x20>; samsung,sysreg = <&syscon_peric1 0x100c>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1178,7 +1178,7 @@ usi_8: usi@109400c0 { "samsung,exynos850-usi"; reg = <0x109400c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1010>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1241,7 +1241,7 @@ usi_i2c_8: usi@109500c0 { "samsung,exynos850-usi"; reg = <0x109500c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1014>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1270,7 +1270,7 @@ usi_9: usi@109600c0 { "samsung,exynos850-usi"; reg = <0x109600c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1018>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1333,7 +1333,7 @@ usi_i2c_9: usi@109700c0 { "samsung,exynos850-usi"; reg = <0x109700c0 0x20>; samsung,sysreg = <&syscon_peric1 0x101c>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1362,7 +1362,7 @@ usi_10: usi@109800c0 { "samsung,exynos850-usi"; reg = <0x109800c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1020>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1425,7 +1425,7 @@ usi_i2c_10: usi@109900c0 { "samsung,exynos850-usi"; reg = <0x109900c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1024>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1454,7 +1454,7 @@ usi_11: usi@109a00c0 { "samsung,exynos850-usi"; reg = <0x109a00c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1028>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1515,7 +1515,7 @@ usi_i2c_11: usi@109b00c0 { "samsung,exynos850-usi"; reg = <0x109b00c0 0x20>; samsung,sysreg = <&syscon_peric1 0x102c>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; diff --git a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi index c759134c9..6e9007518 100644 --- a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi +++ b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi @@ -223,7 +223,7 @@ usi_0: usi@108800c0 { "samsung,exynos850-usi"; reg = <0x108800c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1000>; - samsung,mode = ; + samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; diff --git a/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts b/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts index 387fb779b..b73c152c7 100644 --- a/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts +++ b/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts @@ -161,12 +161,12 @@ &usi_uart { }; &usi8 { - samsung,mode = ; + samsung,mode = ; status = "okay"; }; &usi12 { - samsung,mode = ; + samsung,mode = ; status = "okay"; }; diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot/dts/exynos/google/gs101.dtsi index 302c5beb2..473db46aa 100644 --- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi +++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi @@ -825,7 +825,7 @@ usi_uart: usi@10a000c0 { <&cmu_peric0 CLK_GOUT_PERIC0_PERIC0_TOP1_IPCLK_0>; clock-names = "pclk", "ipclk"; samsung,sysreg = <&sysreg_peric0 0x1020>; - samsung,mode = ; + samsung,mode = ; status = "disabled"; serial_0: serial@10a00000 {