From patchwork Tue Jan 9 12:58:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13514910 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 E19ADC47077 for ; Tue, 9 Jan 2024 12:59:27 +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=CdZuA3v+8xtBy7tmGy30H9/hk85aW+YhYo6Bxi+LlB0=; b=P2fd0VupM6r+jB EBaJjtNQGC9wtqg8KunCcka31Qy+yFz5DDPIqo2Ae/41cLE7QU/rX9GZuSthDck7+iSTf5ZIlnMjd T53QUOkRRjDVyOhZk0lI41Vb3abaOhvXcmACM5ezGyWGu94PbkJsNfnEI22B7TCGCwl7AzYf7V+ET 5Rh47SldBUjB7TvTxjpV73nYnEUIDAt0uIUfq79550RRDUarR1EfvpQjqtVz7XcDZPeLw2xcNumbS ZmYntSbMZ2apRn3m2joqbSRSNWwLZmDpumPrpILm/iBJKhkWdPYkXVBsRpoaVbCTZEm5+FSEmgDhe MKjIzayfgXQL8hME+wug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rNBh5-008Ieb-1K; Tue, 09 Jan 2024 12:58:59 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rNBgu-008ITd-1q for linux-arm-kernel@lists.infradead.org; Tue, 09 Jan 2024 12:58:49 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40e4d64a3d8so10604155e9.0 for ; Tue, 09 Jan 2024 04:58:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704805125; x=1705409925; 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=ndzvAtIphV3/MRhlh+roY7v2JbqJAf5pGogAL74MKKE=; b=NmtqJVO4EN4FLYmtwUGOephcNTS6MsZmo2nHZOO6RcgEu30NJDQx1f1uvyoD5RXVd0 2V4O+p3y4jaABn8GG8y25l5fwW14jbZVUxjIDfkA9L5Yyv7UWEvzl//2lJFUee6VcJqO giztAPBrCyKNka5QZG64M/D7A1r6IsCl5JEh53xf2YKEPFBghHGM2RxocAOh3ln0FS4z eVCnOBVFmf1RT9818lopsnJsXolVN5g1cJMlU5w6ZMp2Kb5Xr+ZB49HJiwk8yIv8S2yi ekPVwZVndfg56J1ckMByBUxaVbWtznaacq630hkV4VD2I+u4z3XsaQZcTnBelOQuCY3b s4zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704805125; x=1705409925; 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=ndzvAtIphV3/MRhlh+roY7v2JbqJAf5pGogAL74MKKE=; b=CNPUeeEfXq25tWO8o1A2fYWuparBgylP3Zj5EO94qFbSx5kpCGK112iPgQ/5x9M0o0 m1s/5qLYoToRKuUETEisiYBMDtbCOWvXfwFXwQR0vswk71IZL9+UjckDSbboPdoA7hgf 3WrtAA6DzoeMH5Az5aS42qjJOHX4SoE7aGbKYHI/L/jovYAi5r/++oji6Ke3cv1dDDDx gUYrXgk4jPrVTW/jtPwreYJDHAPpau56zakjToVEzShteKMwNL4VV25mCjHW9RMM6ONB sAmIf86vjKWtsljlWTCS2+FxSmMHZjQnG98grLaomsT3uHulZ2UPNwtuHKvc+G8ycpN2 96/w== X-Gm-Message-State: AOJu0YwV7/OKah+yDEyUBQRGH5JjnHiIMj7avsztrta+lfYtgUCo12Ah TLA07ul2lWlFaowcjxKvnAlBHjGQjME1kg== X-Google-Smtp-Source: AGHT+IEXrqUo3X98KfIVdC+0JSNna7+jX0vhQXoPTaTb9u2LAvTigz3QPZnlngtgAikkgNuhljk1Dw== X-Received: by 2002:a05:600c:4f09:b0:40e:5057:91f2 with SMTP id l9-20020a05600c4f0900b0040e505791f2mr401494wmq.115.1704805125039; Tue, 09 Jan 2024 04:58:45 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id cw16-20020a056000091000b0033753a61e96sm2351302wrb.108.2024.01.09.04.58.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 04:58:43 -0800 (PST) From: Tudor Ambarus To: peter.griffin@linaro.org, krzysztof.kozlowski+dt@linaro.org, gregkh@linuxfoundation.org Cc: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, conor+dt@kernel.org, andi.shyti@kernel.org, alim.akhtar@samsung.com, jirislaby@kernel.org, s.nawrocki@samsung.com, tomasz.figa@gmail.com, cw00.choi@samsung.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, andre.draszik@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 11/12] arm64: dts: exynos: gs101: define USI8 with I2C configuration Date: Tue, 9 Jan 2024 12:58:13 +0000 Message-ID: <20240109125814.3691033-12-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240109125814.3691033-1-tudor.ambarus@linaro.org> References: <20240109125814.3691033-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-20240109_045848_616962_458439C0 X-CRM114-Status: GOOD ( 11.76 ) 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 Reviewed-by: Sam Protsenko --- v3: reorder usi8 clock order (thanks Andre'!). Did not make any difference at testing as the usi driver treats the clocks in bulk. 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 6aa25cc4676e..f14a24628d04 100644 --- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi +++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi @@ -352,6 +352,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_CLK_PERIC0_USI8_USI_CLK>, + <&cmu_peric0 CLK_GOUT_PERIC0_PERIC0_TOP0_IPCLK_7>; + 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";