From patchwork Sun Jan 5 16:03:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Ivanov X-Patchwork-Id: 13926582 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 0D63CE77197 for ; Sun, 5 Jan 2025 16:06:28 +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=lxpBQHMVVAeu7IpQ4o3HFNNtsYdEjzOkw3t6mRR8+ds=; b=4YgxOomNpAxKjPLKqL9u/TTVwT EoSPAACED5gwMIfUDldWEfw9q3gVwyYEd0poAoaorzepJLlkzhk8PtgjmE/g+SsT8UYFoc4lhDgbk xOsUQSsQaVLazU6rDRof3A3KjZMEESJ5NVJqe/5JQy7SkoTE4qgXixI2hi8srMaXlLypJjljSKA1M 4KeIwGTQkQGBz5PgSBJqs2h1/UfbyZLcqYEe7g/XWHHD38Je1q7fHBzmfjjyNNJs8WUEVzTg/Z4CO dluy4H9lrIc+EFh4mGCzA0EoVZhkhScuDnAyZr/ZUcsjjfNJM8kuRebpr7NR3XqOhvOs84ClkYvNZ 5kjaYT6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tUT8q-0000000H2fY-1NWJ; Sun, 05 Jan 2025 16:06:16 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tUT6W-0000000H2Go-1cxJ for linux-arm-kernel@lists.infradead.org; Sun, 05 Jan 2025 16:03:53 +0000 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3862b40a6e0so7489787f8f.0 for ; Sun, 05 Jan 2025 08:03:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736093031; x=1736697831; 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=lxpBQHMVVAeu7IpQ4o3HFNNtsYdEjzOkw3t6mRR8+ds=; b=SY2/zTRMefnqJ38MQW6yoF/Rj8HwGexztETgcl9MLlj2JTBd31YMFBuDSreBCC4HlX yWa37o9IC9eybRfozOXO/0grTWAo8zNr+ULhSOVAvrMgT57X1iVyiMe4eIVb1rKP4neX 9PM9eXqTq79drg/SMpnWVrBv8S2QcbxJXCcMHrsBYaIOVcusruTSsZNaA7IoadVI0k6w ZaTlRNl90nblCWRRtmTmM+o9GQ5S5y8D/MEfe9WB/JYGbw4nf0L1vgn+VvwHkcdgORX1 r+wYMwFh+Dkp11TKZexGRKyX9wNTp2zuuPFIR0tZ7gygaoOTcF/zc8eaA2z+EURPv2xs ivzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736093031; x=1736697831; 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=lxpBQHMVVAeu7IpQ4o3HFNNtsYdEjzOkw3t6mRR8+ds=; b=IZUjuR8AHBNyIRFx2YedG7CSeRxXPX4jfCRQL6JL5HxWaSLHIyuVq/QcZdseCie8Rc psVKn9dUoOyFsYiH5eSyt2EYHSLqbKd8D9VJ7VsuaJ2lSSJFFdMiyo+elM82rlzgUic6 cywyVGIUYd3GNgpSrjO4kR+UNjBLMuMhvRV2PrQ2Hg5uBtAvr11ebHNjOa3e0OlFifvT sTqGku0h4TC7MJZVDPRitJR1D0BKp3r75+wMhs19UhJhs/gxOiPm5c362VBefi+MA0Lx pyPOel/J6duGj6GlACgNLnvhnJoMbBml/uIq6D2BWTnSqBxjyvCitMRqhaFc5ywAkXYr /u2Q== X-Forwarded-Encrypted: i=1; AJvYcCWEE5dhkcmimYn+e3/OvohaYiF8qyIbSWgwKYGjKvGyPvsk+bWbncw+jQrzJcHG2DBcU8JOCcSEJ1zPFAwdz8Pn@lists.infradead.org X-Gm-Message-State: AOJu0YzgltWCAkE1HeiZQe8m2sR5fQrT2GM/ppjGikZx4aF1SO0I90fo m8yje6YR3pG/T5FYkdbuFB828lGsYZwJscco9NhYbdx0M63byidpjh083A== X-Gm-Gg: ASbGnctQqgiYd+T8MP+OjihDFCElIA0JFNZZUUK++GHdxCRqY5R9mLx5WAjIEgRBkKA kIX5y09KKDrebjHrydI65PJ1C4/pnd0wKx62ULc9w46Zv7I6VbowjBa8mGMoVUyrkGNW4vBQCzJ MK4kyuHUL/NM4xeYir8c5P4wVCeeJI+FtEmvI67oMQREBYBz5rf5UVmLcEJrpL7cOu8Gk1X3AYC 3xOsT8b3nYQvU7PZt4jfhzTgEgbgJB+7XYCRx+QnCZpyV1V2IYkPbOpl6L2ZK3Tkkc35q4= X-Google-Smtp-Source: AGHT+IGJBflGdaxt0JBE4erJyFzFCgFvWRqc6oNwoyTzVkgdyLbBhurZLdzmYjBfDWndtHNBB3/GQw== X-Received: by 2002:a05:6000:1542:b0:385:e43a:4dd8 with SMTP id ffacd0b85a97d-38a221e1832mr40868935f8f.4.1736093030684; Sun, 05 Jan 2025 08:03:50 -0800 (PST) Received: from ivaylo-T580.. ([94.131.202.183]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c84705esm46031925f8f.44.2025.01.05.08.03.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 08:03:50 -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 v3 1/4] dt-bindings: soc: samsung: usi: replace USI_V2 in constants with USI_MODE Date: Sun, 5 Jan 2025 18:03:43 +0200 Message-ID: <20250105160346.418829-2-ivo.ivanov.ivanov1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250105160346.418829-1-ivo.ivanov.ivanov1@gmail.com> References: <20250105160346.418829-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-20250105_080352_434801_4C57A2D8 X-CRM114-Status: GOOD ( 23.56 ) 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 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 replace USI_V2_ with USI_MODE_ in all constants in the bindings. Signed-off-by: Ivaylo Ivanov --- I wasn't sure if it was appropriate to add a Suggested-by tag for Krzysztof because I haven't asked for his permission, so I didn't, but if he wants to add it before merging, please do so! These changes are a bit tricky to approach. My guess was that this would be the best way to put it out - one patch for fixing it in the bindings and trees, then add exynos8895 to the bindings, fiddle with the driver and finally rename the constants in device trees. This breaks compilation if the whole series is not applied, because the driver, the binding and the device trees use the dt-bindings header. If anyone thinks of a better solution to organising the patches, let me know. --- .../devicetree/bindings/soc/samsung/exynos-usi.yaml | 2 +- include/dt-bindings/soc/samsung,exynos-usi.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml index 5b046932f..cc92a06a3 100644 --- a/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml +++ b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml @@ -144,7 +144,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..b7c1406f3 100644 --- a/include/dt-bindings/soc/samsung,exynos-usi.h +++ b/include/dt-bindings/soc/samsung,exynos-usi.h @@ -9,9 +9,9 @@ #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 #endif /* __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H */ From patchwork Sun Jan 5 16:03:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Ivanov X-Patchwork-Id: 13926583 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 23258E77197 for ; Sun, 5 Jan 2025 16:07:39 +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=4qmVtOSWHhzGJr0Y+kskR/DrB7xFafm0zcJLu2D6JbQ=; b=26YI3v868xs7H5E2YXCsiHMaz2 ga/BwGJy3M/AmP+FI9gSGh4tlpWkeLx+Lj30ni3hg1n7zP20J/EMy/KDCh8b8MMYNP7AOXtQ3ym0T 7EXo112+ooaFqMeazThPeEUplhEkfPt8qkWzMZ5KAJDsHaOGmfFBrnc/zktTulxoDYq2Gda3bmkTc H/mGmRZq9eHzDanwp036s0U//6Rs1F7jO1FEXfjpfpzd+nswyuao3CNsUyOnqHdItEcW20J3J4kE8 OS0qfaSOl1zKc/YBwZXDGaPu5TT5mpfqBIGq/Vh8m3zqUq1o489z6FuM6u+HuOZp+E7H7ovQQcrlp HkULhEdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tUT9z-0000000H2r6-0GAU; Sun, 05 Jan 2025 16:07:27 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tUT6Y-0000000H2H9-1lBt for linux-arm-kernel@lists.infradead.org; Sun, 05 Jan 2025 16:03:55 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-43634b570c1so97511465e9.0 for ; Sun, 05 Jan 2025 08:03:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736093033; x=1736697833; 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=4qmVtOSWHhzGJr0Y+kskR/DrB7xFafm0zcJLu2D6JbQ=; b=MFsQUt9mAMjjljbV0dqBnyKdH1vbnFfrkHG8KxMDLa8FHKqdMq1h2fPi0jXA53j+wF Xeuk8JmQyO13Xk4Sl6/6yaR/vwD5D5dvf6WtxqN+Zez+1kff3n4L/vTE6xJk0bDpMlt0 WDqssYRRHd4TV10NXkOGP+1JJ6NrFwQBc1d78PGJgBjjnwiJvhgO74639nqqS5TwLzTh YvnaUGN5tw8qJmWoCD/iotAdJacd9Mhg0H9OEPiqy/GP1rSIaijfSoEXxw+fCicbD+Lp o3exHqJafUU8HaT8I9/2Lr9DsWUkQUQe+sHW9tsT7qtBDaV12SwN0GoojZzLHA3TzQzh W55A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736093033; x=1736697833; 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=4qmVtOSWHhzGJr0Y+kskR/DrB7xFafm0zcJLu2D6JbQ=; b=Yb1mUM/Ho0qtWC4FinXMFVS3cQ6F+egGv3hbbKgnDOIbyG6NvWJHARlDhtQOZ6FKNO Mibe6lbLwXGc+vKM5crihwlOwOAIV/kdM7vQRF17+WwV18lpUWoXNypyq2sgF9vawUtP AmasXynoXoMdYd9n5qpXplEEFkzSkAi73dl532txy8pkdlWwtk5lXi0dtERuTT+GH/mi 1JLk1GPacEZfn984dxIRmholE57by5+rHBd+ZMg7UinSafxfZaJo6YALPwj4LehfIliu DBm4/GTKFu/OLPiTe6815R3IXPVs4gnqocW0n5mkvF8LCKGSzsOoNesNt9rpQnLv4EuO /kuQ== X-Forwarded-Encrypted: i=1; AJvYcCWsjdCtbbd4X7eNYxHpDOiDB9u3DXXj47eLKs7uHeOEcUTJS0yCDDdwmCihl3ple6gk/bu/YyeFewXpGlHKymkb@lists.infradead.org X-Gm-Message-State: AOJu0YzN5V/45hP6Qda4+nDc+oIAxbG0Z8nTI5cU7Pe5yud7o7XF37bs zFleUiiKrbYN5cWmNDIww3qYBQ7IfOrZrDZ3ySe7bDOf4LPr6W4a X-Gm-Gg: ASbGncsKRrwAE/mt2UZsYa2p6N3+ovjSE8t+0y1WGomfZst3ADOIVmpZ9vtkIFKPX4c j65Q6mstg2TqJJmDlv5zvV82eDHsGanOz76hylmA3o71qFsdEje0rbV8480uPdY24wmOA3eobQR 9mc9U8F+jYx4fmbPsYZ87+3XPlwaK8rP4LUtCPaFKsPj5kB3WfJqFuB0+Vhb45+IK1/DNDqRsb0 FIwgrkef7eY7d/n1p0FW3q6LgSerMyp5NJK/jXjbtrtpo3FHfdILTnxJWjof70y0BccHRQ= X-Google-Smtp-Source: AGHT+IFnesuVVc1Uo46pHvm1AMDioiW9JV4G2NuilRchcYuXNT+MCnGq1an3lKmkDQATX33mCMAZIQ== X-Received: by 2002:a05:600c:198c:b0:431:3bf9:3ebb with SMTP id 5b1f17b1804b1-43668b5e045mr422215915e9.24.1736093032346; Sun, 05 Jan 2025 08:03:52 -0800 (PST) Received: from ivaylo-T580.. ([94.131.202.183]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c84705esm46031925f8f.44.2025.01.05.08.03.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 08:03:51 -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 v3 2/4] dt-bindings: soc: samsung: usi: add USIv1 and samsung,exynos8895-usi Date: Sun, 5 Jan 2025 18:03:44 +0200 Message-ID: <20250105160346.418829-3-ivo.ivanov.ivanov1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250105160346.418829-1-ivo.ivanov.ivanov1@gmail.com> References: <20250105160346.418829-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-20250105_080354_459190_C51D6CF3 X-CRM114-Status: GOOD ( 15.94 ) 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. Signed-off-by: Ivaylo Ivanov --- .../bindings/soc/samsung/exynos-usi.yaml | 107 ++++++++++++------ include/dt-bindings/soc/samsung,exynos-usi.h | 3 + 2 files changed, 74 insertions(+), 36 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml index cc92a06a3..d6c39c3e3 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: @@ -64,7 +74,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 +111,62 @@ required: - samsung,sysreg - samsung,mode -if: - properties: - compatible: - contains: - enum: - - samsung,exynos850-usi +allOf: + - if: + properties: + compatible: + contains: + enum: + - google,gs101-usi + - samsung,exynos850-usi + - samsung,exynosautov9-usi + - samsung,exynosautov920-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: false + + clocks: + items: + - description: Bus (APB) clock + - description: Operating clock for UART/SPI protocol + + clock-names: + maxItems: 2 + + samsung,clkreq-on: false -then: - properties: - reg: - maxItems: 1 - - clocks: - items: - - description: Bus (APB) clock - - description: Operating clock for UART/SPI/I2C protocol - - clock-names: - maxItems: 2 - - required: - - reg - - clocks - - clock-names - -else: - properties: - reg: false - clocks: false - clock-names: false - samsung,clkreq-on: false + required: + - clocks + - clock-names additionalProperties: false diff --git a/include/dt-bindings/soc/samsung,exynos-usi.h b/include/dt-bindings/soc/samsung,exynos-usi.h index b7c1406f3..aab28176c 100644 --- a/include/dt-bindings/soc/samsung,exynos-usi.h +++ b/include/dt-bindings/soc/samsung,exynos-usi.h @@ -13,5 +13,8 @@ #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 #endif /* __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H */ From patchwork Sun Jan 5 16:03:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Ivanov X-Patchwork-Id: 13926584 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 7081FE77197 for ; Sun, 5 Jan 2025 16:08:50 +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=3cUvc9znz0E7tKame3aaiF89AtwZ/kSu0btFLEU1OTU=; b=xPZ8o2Cn4TVGkYPpCP38KsZh90 L3GGCXP9FRRXM8GaJFhh3IPrcX2rmbRDA+Mg1qqUplaHRjch8mdDcyfGn8TasrYodxSvPibYb89RU Hfyhkj4jVTqtMXwW9lFwQ66O4pDg/ZSquDNmBiPKfuB4GJvDlsb+VKAUSzDPdArEZgyAkAedWfdoI GpTcjGPjQsuoOyW2d0BymetziFRAFqkZtEZyIxztjgjB6xDoDMK5K2essWNqFIANgSd1756oFCY4z H93eHdgXldPbfoP6eqXG3Fr5kRtCYSkHj6rh0JUl/SIAZWiED06zlXuQ1SpoWHwBLoj2STwxq/q+I 24sdfWZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tUTB7-0000000H2z0-2tBg; Sun, 05 Jan 2025 16:08:37 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tUT6a-0000000H2HZ-0A6s for linux-arm-kernel@lists.infradead.org; Sun, 05 Jan 2025 16:03:57 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-436a03197b2so45199015e9.2 for ; Sun, 05 Jan 2025 08:03:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736093034; x=1736697834; 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=3cUvc9znz0E7tKame3aaiF89AtwZ/kSu0btFLEU1OTU=; b=SJaxTboAtauG5I7EjYDor5PIKs0iZUykpX8Ok5f3/cKWcxmRBtkPJDzgEwea3G5Nu1 em4H+DP+nHtaq+NGd7UW/O6QJYHVhCBxWj23dLD74DwptZO1kvudFdYZie6P61kTdlvV OyplPSzelHhEovyUQSMVu28dsDizKx6y1e2LRecmOGTbmFThWzsXYc+CPqU9rOx5WHm8 z++HqeSxFeswQui6rz2T48SFoQnjPMYlSakkvXJYDnkpiEVa/e0sZrZJWsNPOwu/AKDQ mmCINuP6HGGMOWSE0jeobClpFcSNWxv2klouOghgdjddCtoBQt3bGlRgi598FaxBIJd0 aMBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736093034; x=1736697834; 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=3cUvc9znz0E7tKame3aaiF89AtwZ/kSu0btFLEU1OTU=; b=DDNPoiIZe8PaLcc1PiJQkPhpMoJS2gBtAB3BJl279LPa0t3chi7C0bwi25PDR04BqA kAPDshxXwasiIKRnOw9tWB1xQrTQCfobC42bo4Aqx+KL9v12hKBKlRNy5JWRctrHreGf V12+wjzPZ7QFq6DXGYGid2NPc5fDga0a+Yv50IDEDpxOaESaYaBUSQbbF4BsojT9NgFU 1JPDsc2tJWW3NuhL6Sj5ftzqZG2NXtdiNuTFzlCbw5mdvKGluU/I/41BvxZ97pRohURZ KUUlKS2Or8ZTrsMo9Lo1RWKnLtrY57bfa+dydR2zuErpAql+oayMBdOAdy9h3Ro/qLfy D1Zw== X-Forwarded-Encrypted: i=1; AJvYcCWXe4a8OXN0HvzrLmtbI4K0bTd3mOGA8OoStxpaK8AuYxrRWG/Rl5XU5nY+UFwNvkmSsCJ7nbkGPkLh03jml6wC@lists.infradead.org X-Gm-Message-State: AOJu0YxFclLkxfo2ZjB/98fKmDv5uKL/iMZbIsMQ1M2DWUmB5gmjSoj3 jtcSNN+jxWytfI/DqyCUI68a4mZ8nPbgEWpKMsMtiUPHADP2I7nD X-Gm-Gg: ASbGncv0wb4TBYVYlPWxQKTYKiOys97orvGTKqedG5LooPf/B2JmqU5yaKzFK1XcXZN BU53Wpm6a+Zw8jcIxWinHmrf0IyxLg+hFY/5uboEdX6/XyrneDMcYjju5glXNmd4GYyJS1y829/ X50NnV1tnGofMkG/iCiku7zQ4zrG6uyd6zAcNnUE/qe+ZuLPxOOCXe0DVhTy/ku+5XOv+lRwsSa 0dIWUoWEqUnzILYk4Ydvszn08YKEb9qOITAqswwncp0ECWCax1G3/Wi1tSGTCIM2mxpR/E= X-Google-Smtp-Source: AGHT+IECdL9oah7LnyKA1Y1FSjtzazMt1aFusJKzejPK6BMfcn4QeUZTfTZ5Wv1FMehXae88IXoshw== X-Received: by 2002:adf:ab0c:0:b0:38a:5ce8:7a33 with SMTP id ffacd0b85a97d-38a5ce87b43mr11686435f8f.49.1736093034114; Sun, 05 Jan 2025 08:03:54 -0800 (PST) Received: from ivaylo-T580.. ([94.131.202.183]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c84705esm46031925f8f.44.2025.01.05.08.03.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 08:03:53 -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 v3 3/4] soc: samsung: usi: implement support for USIv1 and exynos8895 Date: Sun, 5 Jan 2025 18:03:45 +0200 Message-ID: <20250105160346.418829-4-ivo.ivanov.ivanov1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250105160346.418829-1-ivo.ivanov.ivanov1@gmail.com> References: <20250105160346.418829-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-20250105_080356_075430_19E2DB4A X-CRM114-Status: GOOD ( 20.05 ) 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. Signed-off-by: Ivaylo Ivanov --- drivers/soc/samsung/exynos-usi.c | 65 ++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/drivers/soc/samsung/exynos-usi.c b/drivers/soc/samsung/exynos-usi.c index 114352695..3dd8202ef 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 = 1, + 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, }; @@ -88,6 +121,10 @@ 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 */ }; MODULE_DEVICE_TABLE(of, exynos_usi_dt_match); @@ -109,14 +146,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; } @@ -169,9 +207,12 @@ static int exynos_usi_configure(struct exynos_usi *usi) return ret; if (usi->data->ver == USI_VER2) - return exynos_usi_enable(usi); + ret = exynos_usi_enable(usi); + else + ret = clk_bulk_prepare_enable(usi->data->num_clks, + usi->clks); - return 0; + return ret; } static int exynos_usi_parse_dt(struct device_node *np, struct exynos_usi *usi) From patchwork Sun Jan 5 16:03:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Ivanov X-Patchwork-Id: 13926585 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 4B162E77197 for ; Sun, 5 Jan 2025 16:10:04 +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=YHNwmT3QBa5BJFmHE8LdeYo/1c ydDYW68kAOA+WQZ2XUu9IP3U9qzdHRaVphjHgG2Rv9jgkQFaoXfh7Q1E+TfFAWOJHGa3JUoOrqLRM PmTh0Bl2bWGlK0NC+lDh1g8e/mAl04LkD5RzZ02814enzCpzhko7sDUSMATkcPKIlF0nxdyuc7+e5 JWpAY3ZVJCQ0xkKe8f1zmK4iDeKWwV/yjMWbKoITU95pwkTB44krCGRLNNFiLQWHStIO04tl26/LC tO7NjUT+qE6D+U2+ojtxwcFJjCcnKfdncyVorJ4W9hzFNFDotWE+H3FCWOWupQS6gm2WtI3CxCBg0 u2ZOxWuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tUTCH-0000000H37E-1JBI; Sun, 05 Jan 2025 16:09:49 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tUT6b-0000000H2Hx-0w4t for linux-arm-kernel@lists.infradead.org; Sun, 05 Jan 2025 16:03:58 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4361f796586so140907285e9.3 for ; Sun, 05 Jan 2025 08:03:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736093036; x=1736697836; 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=Z9tg0m1o76rQ/2zN0ldlN7uRpTEBgzA7KKb+5wIdXgfhprfYT62R4q4e96SLmeusHT WVea7d+EggeSKyVkJsrCstMXcgYqszlDPuswtpdyQOWmk+znaiZ8MN4M2XyljanYOuBz blQpTbIXaFIlAApMJPYUHBwEs9rx1m/4FUYJZXEvoxILjtk1TGv7mtGGCSD8GBef9HTH 1Mgd8blvWULuY/GzhWAWNtFEVCVNzH0xy05Gpe3d646E9vOItVyvgYSeebAXEMo9Dpq1 KMD7oBRwvC2Hib75+fPGMNAL/NJtZYyM4lIaxTp5UGYDLv0HvBYi8HK6zbw6wPUEzQ5k F4kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736093036; x=1736697836; 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=ndenEE+XCEkdYeCE/SHgat6wCI7zYInyH/hHIILx7IiAzrM6SlCDWCjM++InYygcUh cNDwgguCD85qcIHwjECVZFNzcDygQ5D1vNn6zfuDCCpcusM+Kh6LSbQjqsL6bhGXybmC yjnWpp0Vc7RyORSiBlldFffnYfsKsWcmGwRUDRG6fT5KXqS8L6RwOh72IDrz5b/Qu16c 0k1o3f7+QdtYMWOghs7nROxa9wDbgYnbj6RCoCeG9yo3cfsDJaylQfiBhBUrOa0+Z1Bl EeSl0402Kkwz03RYnlESEA4tkbh+nzAlBjBQdb9ZVZGv5GaYvE7RQzp5yXfcJQ5dGcLF vYLQ== X-Forwarded-Encrypted: i=1; AJvYcCW+4d5FBEkUWhfURz9qZLXhVbz7giSjT/TChGyixklfuY6LEsPDJaPAbjFSYfFktS2CasZEFJxb1Fhh7gy9hVOO@lists.infradead.org X-Gm-Message-State: AOJu0YxNIa4kDP46/fFzbpBt9jweAzBH4v19fwVIWZ2PWNUAZuyXRnee WIpAJwAvw8vgDFMM432a8xCsOjB8RZyoqnvMnJ9MbT6hFWGN9nGHqTPFpQ== X-Gm-Gg: ASbGncvml8D3ouzUZTvL1L8UtzFC7zoJoOK3xjJHM18cz0Lu4dJhaf2R8lKXsTaAJQU vV1+wHQTeV+0KaCq1OxUHYjZZ4e5hZ+kkuJhHFhFldg3+HtQBjfE7eeikzDJo3wc+VLt0/Otw5C kkM6QAadQcl4xhGV92tvcLBnp67KN+C7KU1YexRBbWRvNVUq6cqzfgPz4GFgzVJEM//3R684gIO h9eFPSkgC0csF4IT1EvOkG2axuhEel4wS099/myNn2/CfhJeIqsRAKk5EwV1aYOx8Bp0LI= X-Google-Smtp-Source: AGHT+IGJ5yPjEyBY093kqwSSzrdR6Xl6nRHSpFI4J32YiyqdHeZBu6ptxJHCEtmUCp6QJovXur/C9g== X-Received: by 2002:a05:600c:35cb:b0:436:1baa:de1c with SMTP id 5b1f17b1804b1-4366854c186mr466960695e9.13.1736093035592; Sun, 05 Jan 2025 08:03:55 -0800 (PST) Received: from ivaylo-T580.. ([94.131.202.183]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c84705esm46031925f8f.44.2025.01.05.08.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 08:03:55 -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 v3 4/4] arm64: dts: exynos: update all samsung,mode constants Date: Sun, 5 Jan 2025 18:03:46 +0200 Message-ID: <20250105160346.418829-5-ivo.ivanov.ivanov1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250105160346.418829-1-ivo.ivanov.ivanov1@gmail.com> References: <20250105160346.418829-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-20250105_080357_269769_A511E863 X-CRM114-Status: GOOD ( 12.11 ) 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 {