From patchwork Thu Dec 28 12:58:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13505991 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 5F470C3DA6E for ; Thu, 28 Dec 2023 12:58:57 +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:References:In-Reply-To: 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: List-Owner; bh=BouTtfjEbzi5JDrin8nHc8BvPZc8I5bFXcaXD8jSChY=; b=BGm5l6FFxdX13u DaGd8bV5Kal7cPSLxxi3oNlis5EFfh975Z7eIV0R7wDcoqHPUs5G9+STfLoYvNPnDAxST1VrLdVDp ofCQ8PCEnbyq364xmRazBPJK7lXbS/COE9k+75RWsuNm1LWGsXi0eNVus3oMUx6OLIVM9ycRnkYyl gH0sDmUvfuHengEZ13FMtBxYsaEq/FVviccTxAZJagwASGh5jndmQOy7wuio/IX2g1DZzq8+qYqTt 22MkT1pisKIIEMjfqWLw/6lFC7EkKokGHSBXRlp8c0yHqI+Y/Qwwm8YeXkLUxFLYr5tCq4s48J+wa toM3uT/3cU2RTwRV7MJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rIpy4-00Gr7V-0E; Thu, 28 Dec 2023 12:58:32 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rIpxv-00Gr20-32 for linux-arm-kernel@lists.infradead.org; Thu, 28 Dec 2023 12:58:25 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-50e81761e43so2686358e87.2 for ; Thu, 28 Dec 2023 04:58:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703768301; x=1704373101; 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=nshL/2BWW/EmympyN/DOS/o4W55HuW8fqdS5mFUVUCI=; b=juZk3JnParYz669bLvr3LaddihKo/kUvf2F5lN2D3QrtdODWQ42MZgCGW5+8gtNT9q 0ZD6ufsMj2D3TY4aCRqUkaPlTNuwSKADHZBVs6V4Dt0mXHbKCwBrlR5dy8iFbZuJNkyq 3fdD32ylJEGQlmoQ8+b/MnLaKbHTDN1IG617S9FcydepKU1MkAaCMq9O2qTwlXxw5hgU 98nL/RDtC6H6LF9L9R1JKrq9klQ7S/lQ2eBZXHP3EaQff8KFHjf+b8ZTscelhmXMaivC BVxv5V59Z8BYoDXNbI4YO7DIUbg2dGMJ7BKOh22paL58rScSYpv1YsWFQjIHnI2GUZRc 1peA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703768301; x=1704373101; 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=nshL/2BWW/EmympyN/DOS/o4W55HuW8fqdS5mFUVUCI=; b=PnXx1oDZtuA+A8sgytajiT4WT7IG3PONPx4+7cp3UubnsZWyAn9BGH+irEXjpHKufJ nk2eGKGNMm15ray6jMYz7F3yWM1e/ibZUL1JCVLmm3zjUn3JxPvTJzxXmnWEY6ttSip6 mnxBjxHdoxJtI8h2hQAL7KjRTYQb5oTcDzPDhJPTxL/JK8rysIW95IVI6PM5TbjNjV7H Wc70i2wgtghDF8q7bGhVklpcL8iH/KEs02adhenzz1T5xfId3ZzybWg72ev25c8vG6nG NvonI0oAoTsiJVrMwmPXyJU+gXVP+b5pOBLxIf0pKDvw9Q30S7B8QnwBZlW9YdWlclul 42dA== X-Gm-Message-State: AOJu0YxVS5EcF8G1DnMEFlqM7BVQYoTPznF8bDfAlxpJuUlbxGtllBAA yLJe0buqQwB/ohW2pJsxD1nFy7MWJfJW1g== X-Google-Smtp-Source: AGHT+IH1ngv6ejaU7/1CPrITKymTsj3xR3AtePeUh+QgKGYoFnMU100TN5ELJ0cgjYZTMENP3QXhKg== X-Received: by 2002:a05:6512:348c:b0:50e:7c73:f4f3 with SMTP id v12-20020a056512348c00b0050e7c73f4f3mr2253161lfr.9.1703768301689; Thu, 28 Dec 2023 04:58:21 -0800 (PST) Received: from ta2.c.googlers.com.com (216.131.76.34.bc.googleusercontent.com. [34.76.131.216]) by smtp.gmail.com with ESMTPSA id h9-20020a05600c350900b0040d5aca25f1sm8615807wmq.17.2023.12.28.04.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 04:58:21 -0800 (PST) From: Tudor Ambarus To: peter.griffin@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, conor+dt@kernel.org, andi.shyti@kernel.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org, s.nawrocki@samsung.com, tomasz.figa@gmail.com, cw00.choi@samsung.com, arnd@arndb.de, semen.protsenko@linaro.org Cc: andre.draszik@linaro.org, saravanak@google.com, willmcvicker@google.com, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-serial@vger.kernel.org, kernel-team@android.com, Tudor Ambarus Subject: [PATCH v2 11/12] arm64: dts: exynos: gs101: define USI8 with I2C configuration Date: Thu, 28 Dec 2023 12:58:04 +0000 Message-ID: <20231228125805.661725-12-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20231228125805.661725-1-tudor.ambarus@linaro.org> References: <20231228125805.661725-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231228_045823_979679_F2FA76DC X-CRM114-Status: GOOD ( 10.01 ) 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 USI8 I2C is used to communicate with an eeprom found on the battery connector. Define USI8 in I2C configuration. USI8 CONFIG register comes with a 0x0 reset value, meaning that USI8 doesn't have a default protocol (I2C, SPI, UART) at reset. Thus the selection of the protocol is intentionally left for the board dts file. Signed-off-by: Tudor Ambarus --- v2: - identify and use gate clocks instead of dividers - move cells and pinctrl properties from dts to dtsi - move IRQ type constant on the previous line arch/arm64/boot/dts/exynos/google/gs101.dtsi | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot/dts/exynos/google/gs101.dtsi index 0e5b1b490b0b..c6ae33016992 100644 --- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi +++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi @@ -354,6 +354,35 @@ pinctrl_peric0: pinctrl@10840000 { interrupts = ; }; + usi8: usi@109700c0 { + compatible = "google,gs101-usi", + "samsung,exynos850-usi"; + reg = <0x109700c0 0x20>; + ranges; + #address-cells = <1>; + #size-cells = <1>; + clocks = <&cmu_peric0 CLK_GOUT_PERIC0_PERIC0_TOP0_IPCLK_7>, + <&cmu_peric0 CLK_GOUT_PERIC0_CLK_PERIC0_USI8_USI_CLK>; + clock-names = "pclk", "ipclk"; + samsung,sysreg = <&sysreg_peric0 0x101c>; + status = "disabled"; + + hsi2c_8: i2c@10970000 { + compatible = "google,gs101-hsi2c", + "samsung,exynosautov9-hsi2c"; + reg = <0x10970000 0xc0>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&hsi2c8_bus>; + clocks = <&cmu_peric0 CLK_GOUT_PERIC0_PERIC0_TOP0_IPCLK_7>, + <&cmu_peric0 CLK_GOUT_PERIC0_CLK_PERIC0_USI8_USI_CLK>; + clock-names = "hsi2c", "hsi2c_pclk"; + status = "disabled"; + }; + }; + usi_uart: usi@10a000c0 { compatible = "google,gs101-usi", "samsung,exynos850-usi";