From patchwork Fri Oct 6 09:02:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13411159 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 1103DE92FFA for ; Fri, 6 Oct 2023 09:03:41 +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:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Va7boGIHBLMPxgOBYGySfbbzofJYdcLUW4bkW0w2D4c=; b=koZtd63GGlN1RG 8KwzWGCqomRmV2ERUnMLDD9y1DZ6R1RtxDiuZ7mmUlA9fOw+kAUXNqgCsumrV54UdIfqEnNU0fjGA d6lvu39B0Vx69aRIH8PzTFkmS199bfto5s2D5Dl5kBhiw37WxlJR5SxtCjjkIajk8Sz6ZHGdpyYWB ZX03/k8DKLiskJHKsQcSA7iekAAuWyhMtE4X3svHfm4z2zpqJ+Ok4TvgkeAKkL45oKCcEl62XKeZd XhM0QlqsutxPNvOFmbVEpDolydKX9+M/MlJdaWAoUFpsHULxY1SN98ie7z5AeWH2qRV93GOFV/Bpf TrXeFGm0kQC6mM+mt5ag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qogjm-005LaW-21; Fri, 06 Oct 2023 09:03:10 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qogji-005LYH-0R for linux-arm-kernel@lists.infradead.org; Fri, 06 Oct 2023 09:03:08 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-9b9faf05f51so104879666b.2 for ; Fri, 06 Oct 2023 02:03:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696582982; x=1697187782; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FZwC3GB6k52kbCUUG9Ix1b8EAEchE7aYZwBVKYjR4XA=; b=DV10yU9+vH3RboByjtkswbZoRku6cGngezhKT+PjbvYSdHm/f7z8mjqZkpI+T0vTzs SJ2vw0m5DqWrojOD8JlcFdyj/hqVw15JoueTwWnH8QINDMAspXpJgo8AWrxijGeES1pm SVaa/c+/ikcZaGtXM95Ctx1CA/8TzN+ls7NBXigP4u4mM3O0POvjf12TLRyVa7ty8uK/ q9NXF4GgL3tUCEXGlbkVO6yiSzkHE61CG4/N6RvANLSrQLuO5G2M8SgJNKQNf/qDo35m XAD5qjNYgTVYtQcVg3YlG5RxNai+1GmLDPhDcArYCjT42qs/X+3oh1jk4Ni97YojC/DN aZqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696582982; x=1697187782; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FZwC3GB6k52kbCUUG9Ix1b8EAEchE7aYZwBVKYjR4XA=; b=v9V9dryXE/B192iE6/+T6uS19QOg4no1zkPqI5mML1T8E2ATkTSHMGRq+OSZPuOPGf 8waYA+18ciduOsVDCKVwDsLQRYEvPaykc5eS8Cy41hNXID6zTDtakDkQG7wpkcvIQmSs T/AF5wFho6rvE9GDXsPINq3oHavEB30SZxX0LeSoaDeG78ZC/AFRI3tVbM/dtEfglWnY ZQvtTBFvFnR5xP4UknL3cLBTZRGcFA2k7mKaKxBw6CmtxMtJbHSKFYNUX9Cp6SuZAoDt y1QL3WSIBGqzekGqj7FN9GXdLhCRmqo1c9qu9FmkRdWe2Da0hb5UsSM9baSXS7wpYAhy LRhQ== X-Gm-Message-State: AOJu0Yx18dfCH225r1yx1Eq4WRuYtozTOY/nlmKfwYQWJPBnH6bMFgqV 4h1TWkh2GURRsUskRFiTVfqxbw== X-Google-Smtp-Source: AGHT+IFgjvKWajihYoYVd4S6stcnv/3r5UDUv8WzSGycctPSMtIc+S8OOAMWOy8pTIYna42MU/fWTg== X-Received: by 2002:a17:907:6c14:b0:9ae:5c99:f2e2 with SMTP id rl20-20020a1709076c1400b009ae5c99f2e2mr5796258ejc.43.1696582982431; Fri, 06 Oct 2023 02:03:02 -0700 (PDT) Received: from tudordana.roam.corp.google.com ([79.115.63.123]) by smtp.gmail.com with ESMTPSA id i16-20020a1709064ed000b0099bd0b5a2bcsm2536884ejv.101.2023.10.06.02.03.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 02:03:01 -0700 (PDT) From: Tudor Ambarus To: robh+dt@kernel.org, krzysztof.kozlowski@linaro.org, conor+dt@kernel.org, alim.akhtar@samsung.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, semen.protsenko@linaro.org, peter.griffin@linaro.org, Tudor Ambarus Subject: [PATCH] arm64: dts: exynos: set USI mode in board dts Date: Fri, 6 Oct 2023 10:02:58 +0100 Message-ID: <20231006090258.278369-1-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.42.0.609.gbb76f46606-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231006_020306_186047_C039A496 X-CRM114-Status: GOOD ( 13.69 ) 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 The Universal Serial Interface (USI) provides selectable serial protocol (UART, SPI, I2C). Only one function can be used at a time. The SoC provides flexibility for boards to choose the protocol desired. Instead of selecting the USI protocol mode in the SoC dtsi file, select the mode in the board dts file as the USI IP can work in either of the 3 modes, but the board uses just one. Where the USI node was not enabled in the board dts file, just remove the samsung,mode specified in dtsi. Signed-off-by: Tudor Ambarus --- .../boot/dts/exynos/exynos850-e850-96.dts | 2 ++ arch/arm64/boot/dts/exynos/exynos850.dtsi | 8 ------ .../boot/dts/exynos/exynosautov9-sadk.dts | 2 ++ arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 25 ------------------- 4 files changed, 4 insertions(+), 33 deletions(-) diff --git a/arch/arm64/boot/dts/exynos/exynos850-e850-96.dts b/arch/arm64/boot/dts/exynos/exynos850-e850-96.dts index 6ed38912507f..615c1d6647ea 100644 --- a/arch/arm64/boot/dts/exynos/exynos850-e850-96.dts +++ b/arch/arm64/boot/dts/exynos/exynos850-e850-96.dts @@ -15,6 +15,7 @@ #include #include #include +#include / { model = "WinLink E850-96 board"; @@ -187,6 +188,7 @@ &serial_0 { }; &usi_uart { + samsung,mode = ; samsung,clkreq-on; /* needed for UART mode */ status = "okay"; }; diff --git a/arch/arm64/boot/dts/exynos/exynos850.dtsi b/arch/arm64/boot/dts/exynos/exynos850.dtsi index aa077008b3be..db35ee742a27 100644 --- a/arch/arm64/boot/dts/exynos/exynos850.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos850.dtsi @@ -12,7 +12,6 @@ #include #include -#include / { /* Also known under engineering name Exynos3830 */ @@ -574,7 +573,6 @@ usi_uart: usi@138200c0 { compatible = "samsung,exynos850-usi"; reg = <0x138200c0 0x20>; samsung,sysreg = <&sysreg_peri 0x1010>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -600,7 +598,6 @@ usi_hsi2c_0: usi@138a00c0 { compatible = "samsung,exynos850-usi"; reg = <0x138a00c0 0x20>; samsung,sysreg = <&sysreg_peri 0x1020>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -628,7 +625,6 @@ usi_hsi2c_1: usi@138b00c0 { compatible = "samsung,exynos850-usi"; reg = <0x138b00c0 0x20>; samsung,sysreg = <&sysreg_peri 0x1030>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -656,7 +652,6 @@ usi_hsi2c_2: usi@138c00c0 { compatible = "samsung,exynos850-usi"; reg = <0x138c00c0 0x20>; samsung,sysreg = <&sysreg_peri 0x1040>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -684,7 +679,6 @@ usi_spi_0: usi@139400c0 { compatible = "samsung,exynos850-usi"; reg = <0x139400c0 0x20>; samsung,sysreg = <&sysreg_peri 0x1050>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -698,7 +692,6 @@ usi_cmgp0: usi@11d000c0 { compatible = "samsung,exynos850-usi"; reg = <0x11d000c0 0x20>; samsung,sysreg = <&sysreg_cmgp 0x2000>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -738,7 +731,6 @@ usi_cmgp1: usi@11d200c0 { compatible = "samsung,exynos850-usi"; reg = <0x11d200c0 0x20>; samsung,sysreg = <&sysreg_cmgp 0x2010>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; diff --git a/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts b/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts index bc1815f6ada2..91d302703366 100644 --- a/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts +++ b/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts @@ -9,6 +9,7 @@ /dts-v1/; #include "exynosautov9.dtsi" #include +#include / { model = "Samsung ExynosAuto v9 SADK board"; @@ -79,6 +80,7 @@ &ufs_1 { }; &usi_0 { + samsung,mode = ; samsung,clkreq-on; /* needed for UART mode */ status = "okay"; }; diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi index b228cd7e351e..92f4b738834a 100644 --- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi +++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi @@ -9,7 +9,6 @@ #include #include #include -#include / { compatible = "samsung,exynosautov9"; @@ -392,7 +391,6 @@ usi_0: usi@103000c0 { "samsung,exynos850-usi"; reg = <0x103000c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1000>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -454,7 +452,6 @@ usi_i2c_0: usi@103100c0 { "samsung,exynos850-usi"; reg = <0x103100c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1004>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -483,7 +480,6 @@ usi_1: usi@103200c0 { "samsung,exynos850-usi"; reg = <0x103200c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1008>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -545,7 +541,6 @@ usi_i2c_1: usi@103300c0 { "samsung,exynos850-usi"; reg = <0x103300c0 0x20>; samsung,sysreg = <&syscon_peric0 0x100c>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -574,7 +569,6 @@ usi_2: usi@103400c0 { "samsung,exynos850-usi"; reg = <0x103400c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1010>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -636,7 +630,6 @@ usi_i2c_2: usi@103500c0 { "samsung,exynos850-usi"; reg = <0x103500c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1014>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -665,7 +658,6 @@ usi_3: usi@103600c0 { "samsung,exynos850-usi"; reg = <0x103600c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1018>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -727,7 +719,6 @@ usi_i2c_3: usi@103700c0 { "samsung,exynos850-usi"; reg = <0x103700c0 0x20>; samsung,sysreg = <&syscon_peric0 0x101c>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -756,7 +747,6 @@ usi_4: usi@103800c0 { "samsung,exynos850-usi"; reg = <0x103800c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1020>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -818,7 +808,6 @@ usi_i2c_4: usi@103900c0 { "samsung,exynos850-usi"; reg = <0x103900c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1024>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -847,7 +836,6 @@ usi_5: usi@103a00c0 { "samsung,exynos850-usi"; reg = <0x103a00c0 0x20>; samsung,sysreg = <&syscon_peric0 0x1028>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -909,7 +897,6 @@ usi_i2c_5: usi@103b00c0 { "samsung,exynos850-usi"; reg = <0x103b00c0 0x20>; samsung,sysreg = <&syscon_peric0 0x102c>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -938,7 +925,6 @@ usi_6: usi@109000c0 { "samsung,exynos850-usi"; reg = <0x109000c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1000>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1000,7 +986,6 @@ usi_i2c_6: usi@109100c0 { "samsung,exynos850-usi"; reg = <0x109100c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1004>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1029,7 +1014,6 @@ usi_7: usi@109200c0 { "samsung,exynos850-usi"; reg = <0x109200c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1008>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1091,7 +1075,6 @@ usi_i2c_7: usi@109300c0 { "samsung,exynos850-usi"; reg = <0x109300c0 0x20>; samsung,sysreg = <&syscon_peric1 0x100c>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1120,7 +1103,6 @@ usi_8: usi@109400c0 { "samsung,exynos850-usi"; reg = <0x109400c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1010>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1182,7 +1164,6 @@ usi_i2c_8: usi@109500c0 { "samsung,exynos850-usi"; reg = <0x109500c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1014>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1211,7 +1192,6 @@ usi_9: usi@109600c0 { "samsung,exynos850-usi"; reg = <0x109600c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1018>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1273,7 +1253,6 @@ usi_i2c_9: usi@109700c0 { "samsung,exynos850-usi"; reg = <0x109700c0 0x20>; samsung,sysreg = <&syscon_peric1 0x101c>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1302,7 +1281,6 @@ usi_10: usi@109800c0 { "samsung,exynos850-usi"; reg = <0x109800c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1020>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1364,7 +1342,6 @@ usi_i2c_10: usi@109900c0 { "samsung,exynos850-usi"; reg = <0x109900c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1024>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1393,7 +1370,6 @@ usi_11: usi@109a00c0 { "samsung,exynos850-usi"; reg = <0x109a00c0 0x20>; samsung,sysreg = <&syscon_peric1 0x1028>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges; @@ -1453,7 +1429,6 @@ usi_i2c_11: usi@109b00c0 { "samsung,exynos850-usi"; reg = <0x109b00c0 0x20>; samsung,sysreg = <&syscon_peric1 0x102c>; - samsung,mode = ; #address-cells = <1>; #size-cells = <1>; ranges;