From patchwork Sat Dec 4 21:50:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 12694787 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 2E327C433FE for ; Sat, 4 Dec 2021 21:52:33 +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=lFzPqqkqRLVWtryjhG/QgOMzTldXL+E8Xe/4XyDNl1I=; b=G5A7YwIJjAlm8c /M06QhGVAg1SL0AVXep+RMcHb3IyDQZ9n1nozn4q6bZeB59jO7+Rid0ZvgBrtffMn15LUImjCw7ei 88B42Ng2DNiZx/kxutTXpRhpdzjfeql/haglMZnNsdoH8htOSEEcZID0i+HQ/giuGEPTdC5Tr6X7B ST9cCrgpZ5mUMCk1XhCEfi1bYCDy0mHJSysnE8ELooblVkVNjqmBWH8kCWzYyu/wyPXxR553IbR/t xYe3fuss/UNpbp7GtOEAkyansQPYd5FWmntofIIHi25aK9yvQK9FYGYNdjlF/RIZfDmGoycTR6H78 0/jMOAsbdnQ2srj2HkIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcvq-000oZm-Et; Sat, 04 Dec 2021 21:50:58 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcvW-000oSa-C3 for linux-arm-kernel@lists.infradead.org; Sat, 04 Dec 2021 21:50:40 +0000 Received: by mail-wr1-x434.google.com with SMTP id q3so13633055wru.5 for ; Sat, 04 Dec 2021 13:50:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZcRHvW6bfEvOLIyYySuv2qE2GSS7ehbl/asNSPEPqM4=; b=iEq0dsOgTSlEr1yfeHv8uNGVWw4t19mtOu2zRCa1GP3Au6AvAnoRP+DEObJdFyE8Ii DZohsf5LFBYZFgHCkoSGrbBz9P7/RCFd8RWMR3EDZoe86hKxe3NibWlYTHr5JW/USo7s ngwGZ13AzvEndN5WWSsNAUksGLVuHqCp0/lvx+ntx6fqG25e2x8B3dVx6m/L/myD5c7C bmdIULlSfgu80C14w6Z3jX29QaKtIqCGZFPFI3OYWCB7GagoJkY01VWmjR218/+yQK+G z3iUsWOFHIGaIbo/3KKlg9eQhk9KDCpfvCw61yMsAZA0MUEHoDzEena/YvMLRYjZs4Ot oLiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZcRHvW6bfEvOLIyYySuv2qE2GSS7ehbl/asNSPEPqM4=; b=04gpOwrVeru8NWaiGKOZHphqVcDxWMAnfktYMu8JyrD4BeeOZ6q/xdGdKHkMwiTsEF p3jbekMWG2gT1JZ/JXG0BtCCBvBlDobylH1VK23fq7uxAO1as0+Vm3TOkI0H2KC+vL8E DncPmq/iWXOBl3Qp6E4mmRqgnXQKKycm62aPIAFV0BcYgl7yXGuwBBQXJZbOe5HlBt5W mW7pIh3m/LkcTSEw+dXJ9+zG4URdmg8BVCMNYvcGONgX9sYViXC91HVEEAC/MG+Ig7er iLZ87q8c4IAYVW9wdsJgW1tXoKcGqeU3IqvPGTfkDs+yerxbddFS8NzfnUGzXbvnFztk C0Cg== X-Gm-Message-State: AOAM53223LIa9TftJ5f1lVwpEAhKN6wL2ZPhDLYCDCa81UskPQbvjmqi qDMGDdytTizMEJn3w/Gcovv8wA== X-Google-Smtp-Source: ABdhPJyysRBEAitiHy9sXZQ+Z1xaBJZiWfDNVjBJ3SHm7YjFK4uh2Emb6njix4QdVVhIoihApSTXoQ== X-Received: by 2002:a5d:5850:: with SMTP id i16mr31872279wrf.197.1638654636484; Sat, 04 Dec 2021 13:50:36 -0800 (PST) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id e18sm6658830wrs.48.2021.12.04.13.50.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 13:50:36 -0800 (PST) From: Sam Protsenko To: Krzysztof Kozlowski , Rob Herring Cc: Jaewon Kim , Chanho Park , David Virag , Youngmin Nam , Wolfram Sang , Arnd Bergmann , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 1/8] dt-bindings: i2c: exynos5: Convert to dtschema Date: Sat, 4 Dec 2021 23:50:26 +0200 Message-Id: <20211204215033.5134-2-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211204215033.5134-1-semen.protsenko@linaro.org> References: <20211204215033.5134-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211204_135038_451604_E11F978E X-CRM114-Status: GOOD ( 20.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 Convert Samsung Exynos High Speed I2C bindings doc to DT schema format. Changes during bindings conversion: 1. Added missing required clock properties (driver fails when it's unable to get the clock) 2. Removed properties and descriptions that can be found in schemas/i2c/i2c-controller.yaml [1] 3. Fixed the example so it can be validated by dtschema [1] https://github.com/robherring/dt-schema/blob/master/schemas/i2c/i2c-controller.yaml Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski --- Changes in v2: - Added R-b tag by Krzysztof Kozlowski .../devicetree/bindings/i2c/i2c-exynos5.txt | 53 ------------ .../devicetree/bindings/i2c/i2c-exynos5.yaml | 80 +++++++++++++++++++ 2 files changed, 80 insertions(+), 53 deletions(-) delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-exynos5.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt deleted file mode 100644 index 2dbc0b62daa6..000000000000 --- a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt +++ /dev/null @@ -1,53 +0,0 @@ -* Samsung's High Speed I2C controller - -The Samsung's High Speed I2C controller is used to interface with I2C devices -at various speeds ranging from 100khz to 3.4Mhz. - -Required properties: - - compatible: value should be. - -> "samsung,exynos5-hsi2c", (DEPRECATED) - for i2c compatible with HSI2C available - on Exynos5250 and Exynos5420 SoCs. - -> "samsung,exynos5250-hsi2c", for i2c compatible with HSI2C available - on Exynos5250 and Exynos5420 SoCs. - -> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available - on Exynos5260 SoCs. - -> "samsung,exynos7-hsi2c", for i2c compatible with HSI2C available - on Exynos7 SoCs. - - - reg: physical base address of the controller and length of memory mapped - region. - - interrupts: interrupt number to the cpu. - - #address-cells: always 1 (for i2c addresses) - - #size-cells: always 0 - - - Pinctrl: - - pinctrl-0: Pin control group to be used for this controller. - - pinctrl-names: Should contain only one value - "default". - -Optional properties: - - clock-frequency: Desired operating frequency in Hz of the bus. - -> If not specified, the bus operates in fast-speed mode at - at 100khz. - -> If specified, the bus operates in high-speed mode only if the - clock-frequency is >= 1Mhz. - -Example: - -hsi2c@12ca0000 { - compatible = "samsung,exynos5250-hsi2c"; - reg = <0x12ca0000 0x100>; - interrupts = <56>; - clock-frequency = <100000>; - - pinctrl-0 = <&i2c4_bus>; - pinctrl-names = "default"; - - #address-cells = <1>; - #size-cells = <0>; - - s2mps11_pmic@66 { - compatible = "samsung,s2mps11-pmic"; - reg = <0x66>; - }; -}; diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml b/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml new file mode 100644 index 000000000000..16853f6edc53 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/i2c/i2c-exynos5.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung's High Speed I2C controller + +maintainers: + - Krzysztof Kozlowski + +description: | + The Samsung's High Speed I2C controller is used to interface with I2C devices + at various speeds ranging from 100kHz to 3.4MHz. + +allOf: + - $ref: /schemas/i2c/i2c-controller.yaml# + +properties: + compatible: + oneOf: + - enum: + - samsung,exynos5250-hsi2c # Exynos5250 and Exynos5420 + - samsung,exynos5260-hsi2c # Exynos5260 + - samsung,exynos7-hsi2c # Exynos7 + - const: samsung,exynos5-hsi2c # Exynos5250 and Exynos5420 + deprecated: true + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clock-frequency: + default: 100000 + description: + Desired operating frequency in Hz of the bus. + + If not specified, the bus operates in fast-speed mode at 100kHz. + + If specified, the bus operates in high-speed mode only if the + clock-frequency is >= 1MHz. + + clocks: + maxItems: 1 + description: I2C operating clock + + clock-names: + const: hsi2c + +required: + - compatible + - reg + - interrupts + - clocks + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + hsi2c_8: i2c@12e00000 { + compatible = "samsung,exynos5250-hsi2c"; + reg = <0x12e00000 0x1000>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + clock-frequency = <100000>; + clocks = <&clock CLK_USI4>; + clock-names = "hsi2c"; + + pmic@66 { + /* compatible = "samsung,s2mps11-pmic"; */ + reg = <0x66>; + }; + }; From patchwork Sat Dec 4 21:50:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 12694788 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 35D7CC433F5 for ; Sat, 4 Dec 2021 21:52:34 +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=1hh/ydN26/fZxSontQwQ6FKnA9HCTQ4FRUSCChIEzNQ=; b=F6LcrQDvY6Aayu PXMPeksg7/GrntCgt4Q27CH860W0VHE99bPLOBL4BT6NXKy4RekgF5Y/c5SfrTYL25zrl8SoowF7c VTtFqQu0nfv0fQGkV5dy4f1SNrGi/PLf9AdOXDV/lOmN1fo2cD3B0BUiHX4xIdAmnXzjSexGlI6jh AM8laJD+eYz9icGbcGuCzKsjyomDdD2khsRUuV6jlOTQ2dgJzvou8epo5I0gSTOzEXNyCmVx7sjig tonLS25h7zOumK/a43MccnXR6w82VG7AMoa7rjWa6RBkyEkNJL6ATISMNMQt6Y0tyBtfWvAPkxo/c d5ajlf6x1C1QX7Js8VUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcw0-000obs-Hh; Sat, 04 Dec 2021 21:51:08 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcvX-000oU1-M4 for linux-arm-kernel@lists.infradead.org; Sat, 04 Dec 2021 21:50:41 +0000 Received: by mail-wr1-x430.google.com with SMTP id d24so13806342wra.0 for ; Sat, 04 Dec 2021 13:50:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OIuM9QzqoLSFp3o3v/6I/jeSHjCIRjfuq2y/Qtcg3dU=; b=yL/BDPrGOO82E81s2CoZ0i1sJJ8ntfqIiWS4CjUiNhPjUrrYnXiynwHbAIZ7kreR3Q iBFV3FnSCucGcL0aunn+NnYlAbUcCkBgRgxlRHHONde1/IKdqUneyGB13jkeuGeNyg2Z k3GBJ8qCh7CB8mkMyxYm2UFbk3LImIPueitqZ9+GKs59PG5w+7t707ofHVsS+V12c3PP lsZnWBfjhMITxYiY0nN6pdECd0Ul1e1d+Tma8LhVxcxPkXhf2J3sOA8D7/JBvL02bEqT EEwDof0edILDCtp0Tnrkc9VpflPNrNF8PgtG5VNyrx/i6alfgQ15F5Gu8MdFwg5zz+5P GMYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OIuM9QzqoLSFp3o3v/6I/jeSHjCIRjfuq2y/Qtcg3dU=; b=J1epSMaCnfxOJ311Ymx6vxYUSnHhoO0cifgeNZ3QhkFS4XdR/C+gFdkWgq5IdepltA TUvCYGCYo6l2gjFpP25eb/cHhQBp4Ynwq7WtY3QkDvg1t2ehuJPD4SZXkHpl9wce4sBr u1Wlx8fBaFW/1NJ9ZwiO+MGPl9o4AG0SiOm5b6mo6CCjLhZVW5kY5wZL8OSPG1FlvPL9 kyZEaVz2hO91gSoefq278x5AqDPHcaRRLPhPJ3l150Ell0DMmB1936YYG6WGyJW0xAEG 79aGSZNC5MTx/2Tv+Sco7TfluQX/54+FdSD1zMKD+NLvTkTj6OuBLMNjCR2EN+FP6lAW 93hg== X-Gm-Message-State: AOAM533pkbg1tBjaADgnEwqzrwi/oa3dNkKpvuGS+eLEpA3lHOJRrAcK kpz5shsyDiHzuIJjT8F2+dt62g== X-Google-Smtp-Source: ABdhPJw9WaGvY+CHZ6OaiYhj1a7k8vu4++czl8ryj1+oiKXrw5x15nKAzvGtiMtFB/xQXM2GDcOSXw== X-Received: by 2002:adf:e387:: with SMTP id e7mr30584948wrm.412.1638654637884; Sat, 04 Dec 2021 13:50:37 -0800 (PST) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id n32sm6355190wms.42.2021.12.04.13.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 13:50:37 -0800 (PST) From: Sam Protsenko To: Krzysztof Kozlowski , Rob Herring Cc: Jaewon Kim , Chanho Park , David Virag , Youngmin Nam , Wolfram Sang , Arnd Bergmann , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 2/8] dt-bindings: i2c: exynos5: Add exynosautov9-hsi2c compatible Date: Sat, 4 Dec 2021 23:50:27 +0200 Message-Id: <20211204215033.5134-3-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211204215033.5134-1-semen.protsenko@linaro.org> References: <20211204215033.5134-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211204_135039_747945_246C4849 X-CRM114-Status: GOOD ( 12.88 ) 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 From: Jaewon Kim This patch adds new "samsung,exynosautov9-hsi2c" compatible. It is for i2c compatible with HSI2C available on Exynos SoC with USI. Signed-off-by: Jaewon Kim Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski --- Changes in v2: - Added R-b tag by Krzysztof Kozlowski - Removed quotes around compatible strings - Added Exynos850 to comment Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml b/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml index 16853f6edc53..bb6c22fbc442 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml @@ -13,6 +13,11 @@ description: | The Samsung's High Speed I2C controller is used to interface with I2C devices at various speeds ranging from 100kHz to 3.4MHz. + In case the HSI2C controller is encapsulated within USI block (it's the case + e.g. for Exynos850 and Exynos Auto V9 SoCs), it might be also necessary to + define USI node in device tree file, choosing "i2c" configuration. Please see + Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml for details. + allOf: - $ref: /schemas/i2c/i2c-controller.yaml# @@ -23,6 +28,7 @@ properties: - samsung,exynos5250-hsi2c # Exynos5250 and Exynos5420 - samsung,exynos5260-hsi2c # Exynos5260 - samsung,exynos7-hsi2c # Exynos7 + - samsung,exynosautov9-hsi2c # ExynosAutoV9 and Exynos850 - const: samsung,exynos5-hsi2c # Exynos5250 and Exynos5420 deprecated: true From patchwork Sat Dec 4 21:50:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 12694789 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 1898DC433EF for ; Sat, 4 Dec 2021 21:53:02 +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=/xYSjNwgievwlZoL0/DweaDz0Sens9YB7pdO9gGPJfM=; b=OFc8c54P2vwXtl /JT2ptJyVUXMKIRHbsO96tsGT7WPhSQGO6FzfKZq7a4YRFoQ9tN4k++1m1fZ1BHcydhlfA5rMo5xy 8pyy8sWnWsYNOblIhSeWX5QoLEMWkkLJqoQ8gZDjsfsfGRx33sSWLivQYqURu74enBoNG+54qBvuk ontyBiFKzv7KE574clUDpxosxj5wKQipJYLmBVahYKEIhro65HSOQoh0dUyEGQtHFa0vaWeU5vjQX x+JFEIVKnmavj2RSJKyAW1wfiPgXzxNKDcpPkL7SCOytRqZvRAJBdH3H7vJsNkWfRK/owD/h809gy Tefw1P2AX11Yh4fjF8Yg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcwC-000ofE-NV; Sat, 04 Dec 2021 21:51:20 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcvZ-000oUR-1K for linux-arm-kernel@lists.infradead.org; Sat, 04 Dec 2021 21:50:42 +0000 Received: by mail-wm1-x335.google.com with SMTP id i12so5158951wmq.4 for ; Sat, 04 Dec 2021 13:50:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TQEb5+4d/MHt4xPSobaL7ml5ouD0gEGBDjqG0G4xX9M=; b=ECrseyDNNiY7Jwt+Xpb95sq8CIAnKyFzaRW+DibI3Q3GeQPg8mlokWxa3tJAFNUm6U WxPnaJERAUPu024PUz2kuQMEqfRwhOCDhJkc2wZmI3uh4s1JU2qE+iL0EeE+Wacl91wc /ZwPaOMlrhVMG9mNoLLOQdF/bmBGhOsKOuIPd0lkWl6cKeS2IT9xuxeUIqHCttu/stXJ NcClP+N+R8aY/KrUmmX3tR5XZo0gaRYa+dQyvnxsi+HHA6uyhP/WK4Y8T4k5Psp2BBbK 7mFx3CsBP6Oqvu0r/9OKxVls24ohgGvFb6H3EL+cJdTd2VyP3+Vo/QwU+VosyTF1+zpq tG+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TQEb5+4d/MHt4xPSobaL7ml5ouD0gEGBDjqG0G4xX9M=; b=CuTd28hpXGme0cDeCnjFFxaOqkIwvf++mfza1Q6hu15dIAc+2lIo7vXAw8MBQammnh VOnCdi/EZGwjpSGL7HKnGO4E7rs0jpwzUMGrr15BmhJwqFHuLqrqwJifDzl3kkVYbrpO NpXffBSUKslo0W96n1GT4QmLYg1RdoDodO0oKr4rXqP2BKkOBNYF+DYpQaf+KZgdk7ol WCgysRCK0exmBTLzsKlm+Su6OPrpyMaKVYPlDRdfA7veTvtmKUvbt5jnblwRfRtEabVn tY97E+ld5EM4qFXJouYR//pusuFXJljueReUv+Ce3OzhV61ouZkloxJbCkijtnZ2w3VO 8/Rg== X-Gm-Message-State: AOAM533V+2NMmSK450dAXrnjK+20FFJbSKCKGV0K0S73V7t3q6WJHcaf NGH2TyGLQZG29z7dzlL+qVSz0A== X-Google-Smtp-Source: ABdhPJxqRgJbV168k4fnJHdw2UcyHL8bbzlF0Cak39dQhBh69mgkctv1/i1FtQtFYRLA5dH1VU4tMA== X-Received: by 2002:a7b:c102:: with SMTP id w2mr25979442wmi.151.1638654639205; Sat, 04 Dec 2021 13:50:39 -0800 (PST) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id j40sm6699184wms.16.2021.12.04.13.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 13:50:38 -0800 (PST) From: Sam Protsenko To: Krzysztof Kozlowski , Rob Herring Cc: Jaewon Kim , Chanho Park , David Virag , Youngmin Nam , Wolfram Sang , Arnd Bergmann , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 3/8] dt-bindings: i2c: exynos5: Add bus clock Date: Sat, 4 Dec 2021 23:50:28 +0200 Message-Id: <20211204215033.5134-4-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211204215033.5134-1-semen.protsenko@linaro.org> References: <20211204215033.5134-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211204_135041_132157_856D90EF X-CRM114-Status: GOOD ( 14.52 ) 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 new Exynos SoCs (like Exynos850) where HSI2C is implemented as a part of USIv2 block, there are two clocks provided to HSI2C controller: - PCLK: bus clock (APB), provides access to register interface - IPCLK: operating IP-core clock; SCL is derived from this one Both clocks have to be asserted for HSI2C to be functional in that case. Modify bindings doc to allow specifying bus clock in addition to already described operating clock. Signed-off-by: Sam Protsenko --- Changes in v2: - Added 'clock-names' property to 'required:' in case of ExynosAutoV9 - Added example for two clocks case .../devicetree/bindings/i2c/i2c-exynos5.yaml | 59 +++++++++++++++++-- 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml b/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml index bb6c22fbc442..19874e8b73b9 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml @@ -18,9 +18,6 @@ description: | define USI node in device tree file, choosing "i2c" configuration. Please see Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml for details. -allOf: - - $ref: /schemas/i2c/i2c-controller.yaml# - properties: compatible: oneOf: @@ -49,11 +46,16 @@ properties: clock-frequency is >= 1MHz. clocks: - maxItems: 1 - description: I2C operating clock + minItems: 1 + items: + - description: I2C operating clock + - description: Bus clock (APB) clock-names: - const: hsi2c + minItems: 1 + items: + - const: hsi2c + - const: hsi2c_pclk required: - compatible @@ -61,6 +63,31 @@ required: - interrupts - clocks +allOf: + - $ref: /schemas/i2c/i2c-controller.yaml# + - if: + properties: + compatible: + contains: + enum: + - samsung,exynosautov9-hsi2c + + then: + properties: + clocks: + minItems: 2 + + clock-names: + minItems: 2 + + required: + - clock-names + + else: + properties: + clocks: + maxItems: 1 + unevaluatedProperties: false examples: @@ -84,3 +111,23 @@ examples: reg = <0x66>; }; }; + + - | + #include + #include + + hsi2c_2: i2c@138c0000 { + compatible = "samsung,exynosautov9-hsi2c"; + reg = <0x138c0000 0xc0>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&cmu_peri CLK_GOUT_HSI2C2_IPCLK>, + <&cmu_peri CLK_GOUT_HSI2C2_PCLK>; + clock-names = "hsi2c", "hsi2c_pclk"; + + pmic@66 { + /* compatible = "samsung,s2mps11-pmic"; */ + reg = <0x66>; + }; + }; From patchwork Sat Dec 4 21:50:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 12694790 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 83E43C433F5 for ; Sat, 4 Dec 2021 21:53:13 +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=jsPZBM/Dg2Z0pXA90smw6nInmgfU/nPwqx559q73b+M=; b=z3yB9dRITRM1Dj z22tWAqN98LeMSoAFNx2uYlTplXbvDPEbX6ELwo43d+mJPd2+YBofSXkd3J8QZN9lB+WE47io4vot gFea+AXfuxh3Ips4EdRYWRk27rd3fWCJVGolv7B/93KmWD+OSWnGgdCTRT3fPI1EB4qK9A+dLJQin 7JtB1/KtzTNnY9KyAPHrAjUxOZbVwyqme1AFDY/WfNjdQTM1WBPDm5GspJLfS0SeZTCi/uTAAx3lT zXNIzO/VSF0gVvDQIEF8J6QC1qFCOJw6/HUNLxSDaY/pH9atK0JdphVVbaUWlW/duE+zBTDNZTnMf XBbnFoVlhj3CMdhCTUKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcwP-000ojF-Oq; Sat, 04 Dec 2021 21:51:34 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcvZ-000oVI-QV for linux-arm-kernel@lists.infradead.org; Sat, 04 Dec 2021 21:50:43 +0000 Received: by mail-wr1-x42a.google.com with SMTP id v11so13610128wrw.10 for ; Sat, 04 Dec 2021 13:50:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vEb8bBQagJewWHBtqfwwcwV4cYSi0vIEBAgk0xJn/s0=; b=tWU1iRILCon2IGsJZ+QOcUsVjfIGiIo7+PBAd75TTPQNflZjQJBMsANrbGwO3jiWnx 7/0/J0ntrduakW0bi1UAwu3jrGQauAfgFRttbYeDJQLOC1aOEk6OT806r7FBKo3jWbV9 RVB7NVMcn5gEjYX0H16ppaaZLdG+gIKbewuo07DLYtG4oeRVkA0/KyO2N0f+62UGGfu5 hVYnsiQGZU5eD+F/eOy0lngTKlmK/8+segq7mkbAK/1SgcC+/Yy7XBOgj5ez+NKNaad4 z+FIHuM3oN1TG9R/v3QqXhUL97N6ApouL87Edua3A6rH37Bb4ZZEHpvr8DaSWVVfXjoZ yVzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vEb8bBQagJewWHBtqfwwcwV4cYSi0vIEBAgk0xJn/s0=; b=ICMGm1BKGFy0XKvt9NiPd2azTzporWp8/xYuwjcjYcw57OuPOIyihBDqMPPEY3tdbn yqm2Sr/SEc3gKvW2b6jpYjJ9zaknY63qfhJDRrDMeuXa4SEjeHH7iTl8/7oWnii+vHvQ 8TKslWl2jTAIUfPAl33Az9u7WuTYGMMs+wwlVqCr8Xxnx5cXxE7fnQEh+PyiQ0eq+VOg ODU0ApG2G3DDhsOcu0Z/RPwgIN3ARkrXwQimAbbhfkAJ0VAjkAO/DgbZSGgJiMdmEOkm 0xF0zZriSe7N9tbaPJRBPnDYjQTXl74MQl77Br191sUvLhxUGr0IHvoAbixgpzXXiNKw TQfQ== X-Gm-Message-State: AOAM5337EaP9KW+W1+2BQYb6kKLvPwsu0WGJUsIUGDNUdA0XzN5gDYja 2UutcK2jzqaEdGGq+PME1CcTwJMi/j/mkOl/ X-Google-Smtp-Source: ABdhPJwxgArL5m9gzkY+cj69KGRBE7XH+2IKR5k0FGlqqnSEoH59ulCYdN13TPwl2feuzOZXqTzj9Q== X-Received: by 2002:adf:dbd2:: with SMTP id e18mr30816892wrj.478.1638654640492; Sat, 04 Dec 2021 13:50:40 -0800 (PST) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id p19sm7164342wmq.4.2021.12.04.13.50.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 13:50:40 -0800 (PST) From: Sam Protsenko To: Krzysztof Kozlowski , Rob Herring Cc: Jaewon Kim , Chanho Park , David Virag , Youngmin Nam , Wolfram Sang , Arnd Bergmann , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 4/8] i2c: exynos5: Add support for ExynosAutoV9 SoC Date: Sat, 4 Dec 2021 23:50:29 +0200 Message-Id: <20211204215033.5134-5-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211204215033.5134-1-semen.protsenko@linaro.org> References: <20211204215033.5134-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211204_135041_913465_FF3EEA0C X-CRM114-Status: GOOD ( 23.14 ) 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 From: Jaewon Kim ExynosAutoV9 functioning logic mostly follows I2C_TYPE_EXYNOS7, but timing calculation and configuration procedure is changed: e.g. only timing_s3 has to be set now. Another change of HSI2C controller in ExynosAutoV9 SoC is that it's now a part of USIv2 IP-core. No changes is needed for I2C driver though, as all USI related configuration is done in USI driver. Signed-off-by: Jaewon Kim Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski --- Changes in v2: - Added R-b tag by Krzysztof Kozlowski drivers/i2c/busses/i2c-exynos5.c | 62 +++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 9 deletions(-) diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c index c2e4bab11366..5198e71e8dab 100644 --- a/drivers/i2c/busses/i2c-exynos5.c +++ b/drivers/i2c/busses/i2c-exynos5.c @@ -169,6 +169,7 @@ enum i2c_type_exynos { I2C_TYPE_EXYNOS5, I2C_TYPE_EXYNOS7, + I2C_TYPE_EXYNOSAUTOV9, }; struct exynos5_i2c { @@ -230,6 +231,11 @@ static const struct exynos_hsi2c_variant exynos7_hsi2c_data = { .hw = I2C_TYPE_EXYNOS7, }; +static const struct exynos_hsi2c_variant exynosautov9_hsi2c_data = { + .fifo_depth = 64, + .hw = I2C_TYPE_EXYNOSAUTOV9, +}; + static const struct of_device_id exynos5_i2c_match[] = { { .compatible = "samsung,exynos5-hsi2c", @@ -243,6 +249,9 @@ static const struct of_device_id exynos5_i2c_match[] = { }, { .compatible = "samsung,exynos7-hsi2c", .data = &exynos7_hsi2c_data + }, { + .compatible = "samsung,exynosautov9-hsi2c", + .data = &exynosautov9_hsi2c_data }, {}, }; MODULE_DEVICE_TABLE(of, exynos5_i2c_match); @@ -281,6 +290,31 @@ static int exynos5_i2c_set_timing(struct exynos5_i2c *i2c, bool hs_timings) i2c->op_clock; int div, clk_cycle, temp; + /* + * In case of HSI2C controllers in ExynosAutoV9: + * + * FSCL = IPCLK / ((CLK_DIV + 1) * 16) + * T_SCL_LOW = IPCLK * (CLK_DIV + 1) * (N + M) + * [N : number of 0's in the TSCL_H_HS] + * [M : number of 0's in the TSCL_L_HS] + * T_SCL_HIGH = IPCLK * (CLK_DIV + 1) * (N + M) + * [N : number of 1's in the TSCL_H_HS] + * [M : number of 1's in the TSCL_L_HS] + * + * Result of (N + M) is always 8. + * In general case, we don't need to control timing_s1 and timing_s2. + */ + if (i2c->variant->hw == I2C_TYPE_EXYNOSAUTOV9) { + div = ((clkin / (16 * i2c->op_clock)) - 1); + i2c_timing_s3 = div << 16; + if (hs_timings) + writel(i2c_timing_s3, i2c->regs + HSI2C_TIMING_HS3); + else + writel(i2c_timing_s3, i2c->regs + HSI2C_TIMING_FS3); + + return 0; + } + /* * In case of HSI2C controller in Exynos5 series * FPCLK / FI2C = @@ -422,7 +456,10 @@ static irqreturn_t exynos5_i2c_irq(int irqno, void *dev_id) writel(int_status, i2c->regs + HSI2C_INT_STATUS); /* handle interrupt related to the transfer status */ - if (i2c->variant->hw == I2C_TYPE_EXYNOS7) { + switch (i2c->variant->hw) { + case I2C_TYPE_EXYNOSAUTOV9: + fallthrough; + case I2C_TYPE_EXYNOS7: if (int_status & HSI2C_INT_TRANS_DONE) { i2c->trans_done = 1; i2c->state = 0; @@ -443,7 +480,12 @@ static irqreturn_t exynos5_i2c_irq(int irqno, void *dev_id) i2c->state = -ETIMEDOUT; goto stop; } - } else if (int_status & HSI2C_INT_I2C) { + + break; + case I2C_TYPE_EXYNOS5: + if (!(int_status & HSI2C_INT_I2C)) + break; + trans_status = readl(i2c->regs + HSI2C_TRANS_STATUS); if (trans_status & HSI2C_NO_DEV_ACK) { dev_dbg(i2c->dev, "No ACK from device\n"); @@ -465,6 +507,8 @@ static irqreturn_t exynos5_i2c_irq(int irqno, void *dev_id) i2c->trans_done = 1; i2c->state = 0; } + + break; } if ((i2c->msg->flags & I2C_M_RD) && (int_status & @@ -569,13 +613,13 @@ static void exynos5_i2c_bus_check(struct exynos5_i2c *i2c) { unsigned long timeout; - if (i2c->variant->hw != I2C_TYPE_EXYNOS7) + if (i2c->variant->hw == I2C_TYPE_EXYNOS5) return; /* - * HSI2C_MASTER_ST_LOSE state in EXYNOS7 variant before transaction - * indicates that bus is stuck (SDA is low). In such case bus recovery - * can be performed. + * HSI2C_MASTER_ST_LOSE state (in Exynos7 and ExynosAutoV9 variants) + * before transaction indicates that bus is stuck (SDA is low). + * In such case bus recovery can be performed. */ timeout = jiffies + msecs_to_jiffies(100); for (;;) { @@ -611,10 +655,10 @@ static void exynos5_i2c_message_start(struct exynos5_i2c *i2c, int stop) unsigned long flags; unsigned short trig_lvl; - if (i2c->variant->hw == I2C_TYPE_EXYNOS7) - int_en |= HSI2C_INT_I2C_TRANS; - else + if (i2c->variant->hw == I2C_TYPE_EXYNOS5) int_en |= HSI2C_INT_I2C; + else + int_en |= HSI2C_INT_I2C_TRANS; i2c_ctl = readl(i2c->regs + HSI2C_CTL); i2c_ctl &= ~(HSI2C_TXCHON | HSI2C_RXCHON); From patchwork Sat Dec 4 21:50:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 12694791 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 21C2CC433F5 for ; Sat, 4 Dec 2021 21:53:36 +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=VbaOujhQl87Qx0c/hJJUIK6SaL/Wi/kc6qYAcTXxqyM=; b=IRX++MPvsCFN4l 4qlvBiKkDAZyiBJvyn4jDJdghYHPz7cEp6/Z4ARWZD+IEdfHKu0swDUooBsrqH/n8mdoOnaHjpmDl jCbBGU0VSAMCdw/F/L8PYs1k7+iIrMJlTcES42/sGIY8aawmgNHkK2y7UevO1X2bPki3ZTREBdh0W yjFD36x37yFYCvVd1fXgHr0AiuPRy2wRyhIfZKQK2d2a5ESs0SDqzR46FLhv9Ae9YTM9QFLRTk0Rt JiJSygMGLr0waF8ibSnRRAMBX2E/wJfqh6/IdB557/KrLIU22YCZJUW7yJdSKCOK6cKbWQgFicXT8 K8iWzJQUr6Pqddn8a2Iw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcwg-000oqw-HZ; Sat, 04 Dec 2021 21:51:50 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcvb-000oWJ-TR for linux-arm-kernel@lists.infradead.org; Sat, 04 Dec 2021 21:50:45 +0000 Received: by mail-wm1-x32b.google.com with SMTP id c6-20020a05600c0ac600b0033c3aedd30aso4851997wmr.5 for ; Sat, 04 Dec 2021 13:50:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pVkIUWY0OSvWRa+LskKzcmg/hbEtnNu06lHh+/SBJ88=; b=FpJlj8JqtuSaC21wsmqZDhvAYKWzvMA5cei5fusZjowiLmCrphGiOdzasy8e4fUpEz MoCdSAuC6Yyqpf0gEqhux7DWayKOff556o3FMgJPrdy0sfzk/75DgbkvDundR4zStIoU x3fhnvpJH/u9TopmkgxTklKzXAnk4JFKItqsTfp5rS0G5ZkjiWbU0mZH8k44JR/xvdwL BvnYd4VPvrlwaX2gZt+hbFx2WzAaQHBX+aGoFgJ15Om2C/2HkLB2JZ6RugBUzz36SVUz DeMFw+H+xbQbGiIIL7SYo00MARX/A/I5aB607hlLyty4vz+9WxohxIp1tpM6YhcvygD3 q6Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pVkIUWY0OSvWRa+LskKzcmg/hbEtnNu06lHh+/SBJ88=; b=Pag5ymX/+uPJdDMyMOw16hEZvVDQNB0nEyA85bY5L/yspMHx9vfexeSesIRC9SpoJk +vyScYg9jdnRUvHF+sx7FLxYFwSmUKRv4wcVO7yIKhE0XMmFjpsPNvMvfkpWyaivl2ee qwq9wKatq8eUK3vUkeFBtYE2ZKneIavCEWhLUpR9+Lf7i2E42oTCD+VAPlwBQGEYa6lI 8qvyscsOT3QXNcVY6ta2pfnxB4Ze38Yxq7YG48qOchFZv7cvbW2wr0zbLVRFJ+hsy9VW PD9ilCJ4aZtTPBiLPlo34Kh7WFYqrXag8jk8h6hChVieulbeuUpn4dRg0HotTdM3cdtd YH8g== X-Gm-Message-State: AOAM5317aiSjrvLeFaNiWCW/02NlLL7FADCb5N1yK1ZmgLDsqD0jI9HH sCmUe8HMzyZ6twwZf/ebjlAkzg== X-Google-Smtp-Source: ABdhPJzlV1DW8PKUpxjP73QanGy9XDrP9z1KHI3+n/qz+wxRQ/2ZHlW5QhepDn2YDnt1aTVmYxzZpg== X-Received: by 2002:a05:600c:1d97:: with SMTP id p23mr26535412wms.186.1638654642106; Sat, 04 Dec 2021 13:50:42 -0800 (PST) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id i17sm7355238wmq.48.2021.12.04.13.50.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 13:50:41 -0800 (PST) From: Sam Protsenko To: Krzysztof Kozlowski , Rob Herring Cc: Jaewon Kim , Chanho Park , David Virag , Youngmin Nam , Wolfram Sang , Arnd Bergmann , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 5/8] i2c: exynos5: Add bus clock support Date: Sat, 4 Dec 2021 23:50:30 +0200 Message-Id: <20211204215033.5134-6-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211204215033.5134-1-semen.protsenko@linaro.org> References: <20211204215033.5134-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211204_135043_984055_023FAA58 X-CRM114-Status: GOOD ( 19.99 ) 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 new Exynos SoCs (like Exynos850) where HSI2C is implemented as a part of USIv2 block, there are two clocks provided to HSI2C controller: - PCLK: bus clock (APB), provides access to register interface - IPCLK: operating IP-core clock; SCL is derived from this one Both clocks have to be asserted for HSI2C to be functional in that case. Add code to obtain and enable/disable PCLK in addition to already handled operating clock. Make it optional though, as older Exynos SoC variants only have one HSI2C clock. Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanho Park --- Changes in v2: - Added R-b tag by Krzysztof Kozlowski - Added R-b tag by Chanho Park drivers/i2c/busses/i2c-exynos5.c | 46 ++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c index 5198e71e8dab..9cde5ecb9449 100644 --- a/drivers/i2c/busses/i2c-exynos5.c +++ b/drivers/i2c/busses/i2c-exynos5.c @@ -182,7 +182,8 @@ struct exynos5_i2c { unsigned int irq; void __iomem *regs; - struct clk *clk; + struct clk *clk; /* operating clock */ + struct clk *pclk; /* bus clock */ struct device *dev; int state; @@ -757,10 +758,14 @@ static int exynos5_i2c_xfer(struct i2c_adapter *adap, struct exynos5_i2c *i2c = adap->algo_data; int i, ret; - ret = clk_enable(i2c->clk); + ret = clk_enable(i2c->pclk); if (ret) return ret; + ret = clk_enable(i2c->clk); + if (ret) + goto err_pclk; + for (i = 0; i < num; ++i) { ret = exynos5_i2c_xfer_msg(i2c, msgs + i, i + 1 == num); if (ret) @@ -768,6 +773,8 @@ static int exynos5_i2c_xfer(struct i2c_adapter *adap, } clk_disable(i2c->clk); +err_pclk: + clk_disable(i2c->pclk); return ret ?: num; } @@ -807,10 +814,18 @@ static int exynos5_i2c_probe(struct platform_device *pdev) return -ENOENT; } - ret = clk_prepare_enable(i2c->clk); + i2c->pclk = devm_clk_get(&pdev->dev, "hsi2c_pclk"); + if (IS_ERR(i2c->pclk)) + i2c->pclk = NULL; /* pclk is optional */ + + ret = clk_prepare_enable(i2c->pclk); if (ret) return ret; + ret = clk_prepare_enable(i2c->clk); + if (ret) + goto err_pclk; + i2c->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(i2c->regs)) { ret = PTR_ERR(i2c->regs); @@ -853,6 +868,7 @@ static int exynos5_i2c_probe(struct platform_device *pdev) platform_set_drvdata(pdev, i2c); clk_disable(i2c->clk); + clk_disable(i2c->pclk); dev_info(&pdev->dev, "%s: HSI2C adapter\n", dev_name(&i2c->adap.dev)); @@ -860,6 +876,9 @@ static int exynos5_i2c_probe(struct platform_device *pdev) err_clk: clk_disable_unprepare(i2c->clk); + + err_pclk: + clk_disable_unprepare(i2c->pclk); return ret; } @@ -870,6 +889,7 @@ static int exynos5_i2c_remove(struct platform_device *pdev) i2c_del_adapter(&i2c->adap); clk_unprepare(i2c->clk); + clk_unprepare(i2c->pclk); return 0; } @@ -881,6 +901,7 @@ static int exynos5_i2c_suspend_noirq(struct device *dev) i2c_mark_adapter_suspended(&i2c->adap); clk_unprepare(i2c->clk); + clk_unprepare(i2c->pclk); return 0; } @@ -890,21 +911,30 @@ static int exynos5_i2c_resume_noirq(struct device *dev) struct exynos5_i2c *i2c = dev_get_drvdata(dev); int ret = 0; - ret = clk_prepare_enable(i2c->clk); + ret = clk_prepare_enable(i2c->pclk); if (ret) return ret; + ret = clk_prepare_enable(i2c->clk); + if (ret) + goto err_pclk; + ret = exynos5_hsi2c_clock_setup(i2c); - if (ret) { - clk_disable_unprepare(i2c->clk); - return ret; - } + if (ret) + goto err_clk; exynos5_i2c_init(i2c); clk_disable(i2c->clk); + clk_disable(i2c->pclk); i2c_mark_adapter_resumed(&i2c->adap); return 0; + +err_clk: + clk_disable_unprepare(i2c->clk); +err_pclk: + clk_disable_unprepare(i2c->pclk); + return ret; } #endif From patchwork Sat Dec 4 21:50:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 12694792 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 58363C433EF for ; Sat, 4 Dec 2021 21:53:54 +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=G5pHACDQIFwFZmb1KOmMpBE3AcCp1/KZaMA9C5UPNfY=; b=3+04KinbemNoJl BPFXhSyTkcV6jmNR+PQgCQsXu28N4w5nj4Sg/D/xhbn4ocgRSKy4nLhNlmD2/0Bfpzx9GaPnpq4qD KPOgtbSPrAcmmFjl84YDJIBGzdeasilnkS5bNjHTRyBbN81racPGVfp+evMfvl9+blaEWggJTP9qn Jx9Xv7MTjSnNkB4rENS5o0UWoRO6JNrm+2T/uuiYygqWChU69EJ8hv9NcLZHw6bUp6QjtweMiieFL HkBZr7xpBpLfPSadK/27asCI6F1c+1Nxk2Xmb8kDDVzFzNH71ITXYQQqfgIS2vVMgPZkn6DIHRJio a/IBUTS53h0uL3cDZ0+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcx1-000p0D-DR; Sat, 04 Dec 2021 21:52:11 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcvd-000oWc-Ba for linux-arm-kernel@lists.infradead.org; Sat, 04 Dec 2021 21:50:46 +0000 Received: by mail-wm1-x32f.google.com with SMTP id g191-20020a1c9dc8000000b0032fbf912885so4873116wme.4 for ; Sat, 04 Dec 2021 13:50:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9/f5H72OZwAWBfTwWjxjh3Cswg/BAbbKzAOQfyJ7mk4=; b=j845AMUScjELCUCmoLjdlY+uvs2lRhE9hbDTxip9EUwCkFV3am2Z7SjrnrqxjvGiKF hC23K5/8j2qpLGQ4DYV0+nDP1av5A+O6jV6by6cwYq1Ebw9bziaroWbAfj+cXzu0XbEu VWcysmTGbfvGn8TOw7rYo1cFwewtQyxw7X0xjbmkPCNg8kfpWl46sKLyhJKCbiWF3z9F tmuKRH34yz0U7GTUbSNlc27T0zJv1KLAlYPaj/0Y+IdcVvyPpjIyVIS2IjWwf8YLpo3v bOI5o6jMHUZ604XZ3oRzOPfgKoR4RY04FPWi0eb0KO2xvQk8XOxt42q7sePL7W1hFmPL 6aCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9/f5H72OZwAWBfTwWjxjh3Cswg/BAbbKzAOQfyJ7mk4=; b=Xs6vUh+JBPJ21vSxa+oi/pu9fO+VuMoz7RmrRrMTgDU2BRyDEVY9yd/Qn2fkLDl58S kyveK1KWjpeUAVH8HdNCz87+v/6FlXXvZlD8ePcFrYLxGjZ4/QWACGs1rrw6JWqm88Iv 2uNNtPl6AJNZwVOEfx7V2C2Z8ZtrRlheMUjTDANjutMcIQiq4hJotdPDjxYOOYyGbmt3 DXI60wKIngomccP43bM4tw92ivURDqICd8nefxvbzjjgospPgwBK15uXmWoslRi44X5l uRxH7z7/sOPZU088lnlplDqfJID6DnmR70ASgUXFZggXIBfgWJB0ZGc6R+MlOs4WhSuK z/Qw== X-Gm-Message-State: AOAM533g44X+v9GqZktk152sPrtrZT0tC09UNhMz6RTVKVrvZuw54bfT 1PwFwcA0xDhBMQlV0JBC6IEF1Q== X-Google-Smtp-Source: ABdhPJx2IvYVdZYiENMhh0xl6q/Cj6e08pCD+C1CHc9FvHoaLGmv8j15mHZvoetiBjeVL5tQtuhqIA== X-Received: by 2002:a05:600c:511c:: with SMTP id o28mr26887636wms.96.1638654643548; Sat, 04 Dec 2021 13:50:43 -0800 (PST) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id l22sm6370150wmp.34.2021.12.04.13.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 13:50:43 -0800 (PST) From: Sam Protsenko To: Krzysztof Kozlowski , Rob Herring Cc: Jaewon Kim , Chanho Park , David Virag , Youngmin Nam , Wolfram Sang , Arnd Bergmann , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 6/8] i2c: exynos5: Mention Exynos850 and ExynosAutoV9 in Kconfig Date: Sat, 4 Dec 2021 23:50:31 +0200 Message-Id: <20211204215033.5134-7-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211204215033.5134-1-semen.protsenko@linaro.org> References: <20211204215033.5134-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211204_135045_423870_069B5DBC X-CRM114-Status: GOOD ( 12.21 ) 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 I2C controller chosen by I2C_EXYNOS5 config option is also suitable for Exynos850 and ExynosAutoV9 SoCs. State that specifically in I2C_EXYNOS5 symbol help section. Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanho Park --- Changes in v2: - Added R-b tag by Krzysztof Kozlowski - Added R-b tag by Chanho Park drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index df89cb809330..42da31c1ab70 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -617,7 +617,7 @@ config I2C_EXYNOS5 help High-speed I2C controller on Samsung Exynos5 and newer Samsung SoCs: Exynos5250, Exynos5260, Exynos5410, Exynos542x, Exynos5800, - Exynos5433 and Exynos7. + Exynos5433, Exynos7, Exynos850 and ExynosAutoV9. Choose Y here only if you build for such Samsung SoC. config I2C_GPIO From patchwork Sat Dec 4 21:50:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 12694793 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 BF4EDC433F5 for ; Sat, 4 Dec 2021 21:54:33 +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=RyV2Eh/E5fRJCeSTh5zgfrfeIQdK41ZgrLu0velxu4s=; b=cI/xqoJfqjLCoL r4CDun8/u6DBLFfiEzCsDa7Oet0LzZzT9zrhZnR5cHob/JHGMG9MoTr8aVe4D9+FIaWYrzYNIb3+p cDqnR4bGbI4Qc9Cp3OEtXso/XFFgfCkNRjOsYx9T7K9grNCGRn7fVQ97rB/ty+OCeUcSsEmiqpLZF DZ37l1uoHNxoSpfXdO1MwD0cqOjSJeb9Ym0QnKuJkFMYgeQyg6Y8AWfA5OyN0L6yjrs+xnn+R88b2 eCwor9W4dn8iV/OMA0S0UgSX23SEI6NNPRE+y+d2juAJNUAAb1NUtU3edhFKJXEC5LydXErZMMqne QONNRGSAhHR/rVixFsrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcxd-000pIy-FI; Sat, 04 Dec 2021 21:52:50 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcvf-000oXY-0d for linux-arm-kernel@lists.infradead.org; Sat, 04 Dec 2021 21:50:48 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 133so5216955wme.0 for ; Sat, 04 Dec 2021 13:50:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=68SA4R0NxLIr37Da5nfLfh6Rq6kJdXUgL0ant2P/Sj4=; b=DfQH/J3lFsJL/4doc0DHJyFgiG3tiIT0umEEr7A3zlof5Zq6UT/vmsg4AFlAVdOrff HO4eDSGhUaxJKCUJSJu5oWEIhODphofDUFYX2LZaY3o9r4syF6kf2yZyxrT6kY1fREqw 2m7ZZodHelhkBQH3Ubx33XZo4i3YkuvUjMP2qwfMLR93BcPMjXajsbiFfPcJNrLy3/mZ hBqaMCXzpIBIXgtKxup5Oa0WywuhdUGG1M8DruurLCvfBpqC1Vq2Tdqtz9IPjdrjTcQ9 e4g9Ou68nCZVdhJOLsysk1SRV2HjcoA2i8+xe6/mXR90nn0R03i8HRIF5+56ovFml+x1 Jd8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=68SA4R0NxLIr37Da5nfLfh6Rq6kJdXUgL0ant2P/Sj4=; b=TrNHdeAktqDYSiaGMaE4TUTnAnmb7VNfMkhDG1Mn9R3XLHuwlhMM+riYE/04Qr9S2j 0ZYX4GGll7OSZH/+1NszicvLlpIqohTn4PQmo6BcrT3ypitkzGoOdPEUvozDHzKtPtWE lBzHkZls7VjEKGuqjp39XcWjJfiDua/OGQNZISJpZtARlsiR1+WrTBQhULmLGn7+7+sR du9asuQjeXkwkwbes+cpHGronsLQRntFqXhBvTlYNNzN/8x74kG3w4xr6BWKXjfkPyTp vPpTqhHAWM1zcWX71Jx6YPHnlp3rm1/34miVgqbrDuO5QT7do/dbpmUjhNKXmRKFFE9W AeUw== X-Gm-Message-State: AOAM532Aj/vqzpaRWFMm+XyPXBbeVcBGrMWBFlVrj8VieQ4hoJ9nupR3 bsVK9YLO31gkcyB1G+5xe4LP/g== X-Google-Smtp-Source: ABdhPJxg6zYHX/wn2h11gWbATGIfIOzg77VcmmUb7U9+Dht0OhnO402P6b76UA+S4iJShOKRrtakrg== X-Received: by 2002:a05:600c:4e01:: with SMTP id b1mr26102478wmq.109.1638654645242; Sat, 04 Dec 2021 13:50:45 -0800 (PST) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id f7sm11250303wmg.6.2021.12.04.13.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 13:50:44 -0800 (PST) From: Sam Protsenko To: Krzysztof Kozlowski , Rob Herring Cc: Jaewon Kim , Chanho Park , David Virag , Youngmin Nam , Wolfram Sang , Arnd Bergmann , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 7/8] arm: dts: exynos: Rename hsi2c nodes to i2c for Exynos5260 Date: Sat, 4 Dec 2021 23:50:32 +0200 Message-Id: <20211204215033.5134-8-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211204215033.5134-1-semen.protsenko@linaro.org> References: <20211204215033.5134-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211204_135047_082755_00EB677D X-CRM114-Status: GOOD ( 12.59 ) 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 Device Tree specification it's recommended to use "i2c" name for I2C nodes. Now that i2c-exynos5 dt-schema binding was added, it shows some warnings like this when validating HS-I2C nodes: hsi2c@xxxxxxxxx: $nodename:0: 'hsi2c@xxxxxxxx' does not match '^i2c(@.*)?' From schema: Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml Rename hsi2c@* to i2c@* to fix those warnings. Signed-off-by: Sam Protsenko --- Changes in v2: - This patch was added in v2 arch/arm/boot/dts/exynos5260.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/exynos5260.dtsi b/arch/arm/boot/dts/exynos5260.dtsi index 52fa211525ce..524d244050e0 100644 --- a/arch/arm/boot/dts/exynos5260.dtsi +++ b/arch/arm/boot/dts/exynos5260.dtsi @@ -368,7 +368,7 @@ mmc_2: mmc@12160000 { status = "disabled"; }; - hsi2c_0: hsi2c@12da0000 { + hsi2c_0: i2c@12da0000 { compatible = "samsung,exynos5260-hsi2c"; reg = <0x12DA0000 0x1000>; interrupts = ; @@ -381,7 +381,7 @@ hsi2c_0: hsi2c@12da0000 { status = "disabled"; }; - hsi2c_1: hsi2c@12db0000 { + hsi2c_1: i2c@12db0000 { compatible = "samsung,exynos5260-hsi2c"; reg = <0x12DB0000 0x1000>; interrupts = ; @@ -394,7 +394,7 @@ hsi2c_1: hsi2c@12db0000 { status = "disabled"; }; - hsi2c_2: hsi2c@12dc0000 { + hsi2c_2: i2c@12dc0000 { compatible = "samsung,exynos5260-hsi2c"; reg = <0x12DC0000 0x1000>; interrupts = ; @@ -407,7 +407,7 @@ hsi2c_2: hsi2c@12dc0000 { status = "disabled"; }; - hsi2c_3: hsi2c@12dd0000 { + hsi2c_3: i2c@12dd0000 { compatible = "samsung,exynos5260-hsi2c"; reg = <0x12DD0000 0x1000>; interrupts = ; From patchwork Sat Dec 4 21:50:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 12694794 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 8EFBDC433EF for ; Sat, 4 Dec 2021 21:55:21 +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=ifw3ijjf4luWRHHgFutQxhGP6+K3QDJ/UN8uwT4sICI=; b=r0o3Ekg8iG6HYU C90iGKdXss+dKcZCSCIYgHpPcFXjqd/N2B2rdcPtYx0XkMWewPfDjiicG/pSP3YhKIEsmTCHDY4rA 3G0Mi4Txgv9swWQCUDSmQxQle0NFkZ/LdLdFDvNN4cHyO9/TX7yicsHqmTxk4MNKRQdL9wViuSx6K cJlTTW1DxIYq9K3zwBkbJaEOyfQbnIfSjY9WOBAp0U1sUt8fFhbhxrGV3Tl5bijEiUhu8Szm8WSxO tG2PjDRTrYbukufPlKIoHVNnzBBpT5dT5eKz+ryK8pIW/B5vUkBe6yJVEtwV3xC5vAd/iF/eq6LzK 0LL1pieTNnn1rMPj8thg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcyK-000peW-IX; Sat, 04 Dec 2021 21:53:33 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtcvf-000oXx-SY for linux-arm-kernel@lists.infradead.org; Sat, 04 Dec 2021 21:50:49 +0000 Received: by mail-wr1-x430.google.com with SMTP id t9so13629691wrx.7 for ; Sat, 04 Dec 2021 13:50:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K3czBnhF20hlEpxNiPEsab7v5hRpy0g/kc9Op3PQw6E=; b=ZkRzTnvt4ql3CNJptSHFHFnqI6C0lMOaG5TjlPGifpfU50QCdUjEzFiS7b6rEhmKvr 8nuIX6W7DrSblZO7lPHCnTUzn5zNW93DeVQY4qXa3CkOigSRLyBmAYwF9TpTIC/NMwAf IYud44IcJYiTXYQmsNrsE4ApFzhHRB5NADKQc9xmQt7FWH8+8/P77xyW8QY3o5g/yTTK h2sQlAI/KPcD/13lQEA/3fTPK4ajIYxuyf5+VsAhXwMP2O0+t0kjTxXybL4VCvITsjeC SaobDJfJpOJZ7dxJ85gr8F7WBYqNfdtxCMg94cHPPD/wrHE9DuQxx9P/aZuC+GWWXanF VUTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K3czBnhF20hlEpxNiPEsab7v5hRpy0g/kc9Op3PQw6E=; b=F4YB+DwX3FJQnCBU6/SlWMv1chOWYA7KOvlvWsjNPAxYGvkc8mxLtqnxjwEF//HC+M XpSxyKfNbk7+qgdwsKF16rIBnXRJIV86CBn6AVm4YSv1MEza4uBssg/X92RiLw26+13C ULq2MX4AwvfUxfVAiO312rmDOWK7f2CLpEJ0WqYEDghF3f3I6MjcAy8907sucd5wo0fs LVUExvA18eRdjl4zp/ZxK78e/y8+YncO3AqCfRqFxhRGewJ1hM1gDYylzrJHwz0OOi9R DmZdzsdRprX52KbRGu+3th4UTTbp9Bw7OPNOxXOsrBMfABlvASB8wgHDp2NXb5OuF7Il XANw== X-Gm-Message-State: AOAM530v0WoI7z6Pv/hZlkHe5pgaPdtn2Dg43RbojJVMVFfPF7Sz/5kv +fgWNFD7SmK1nO7znT5bAyygZg== X-Google-Smtp-Source: ABdhPJwYgQXAcOt8EZ1YPq7ydpSLx6y+FyyhU59Ff+vkJaMhr6uqXvFRjh/OIA+LCk2bppXI13r9eg== X-Received: by 2002:adf:fa81:: with SMTP id h1mr30980791wrr.27.1638654646727; Sat, 04 Dec 2021 13:50:46 -0800 (PST) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id r17sm7385255wmq.11.2021.12.04.13.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 13:50:46 -0800 (PST) From: Sam Protsenko To: Krzysztof Kozlowski , Rob Herring Cc: Jaewon Kim , Chanho Park , David Virag , Youngmin Nam , Wolfram Sang , Arnd Bergmann , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 8/8] arm64: dts: exynos: Rename hsi2c nodes to i2c for Exynos5433 and Exynos7 Date: Sat, 4 Dec 2021 23:50:33 +0200 Message-Id: <20211204215033.5134-9-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211204215033.5134-1-semen.protsenko@linaro.org> References: <20211204215033.5134-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211204_135047_957066_4998FA45 X-CRM114-Status: GOOD ( 12.49 ) 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 Device Tree specification it's recommended to use "i2c" name for I2C nodes. Now that i2c-exynos5 dt-schema binding was added, it shows some warnings like this when validating HS-I2C nodes: hsi2c@xxxxxxxxx: $nodename:0: 'hsi2c@xxxxxxxx' does not match '^i2c(@.*)?' From schema: Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml Rename hsi2c@* to i2c@* to fix those warnings. Signed-off-by: Sam Protsenko --- Changes in v2: - This patch was added in v2 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 24 +++++++++++----------- arch/arm64/boot/dts/exynos/exynos7.dtsi | 24 +++++++++++----------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi index 4422021cf4b2..bfe4ed8a23d6 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi @@ -1585,7 +1585,7 @@ pwm: pwm@14dd0000 { status = "disabled"; }; - hsi2c_0: hsi2c@14e40000 { + hsi2c_0: i2c@14e40000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14e40000 0x1000>; interrupts = ; @@ -1598,7 +1598,7 @@ hsi2c_0: hsi2c@14e40000 { status = "disabled"; }; - hsi2c_1: hsi2c@14e50000 { + hsi2c_1: i2c@14e50000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14e50000 0x1000>; interrupts = ; @@ -1611,7 +1611,7 @@ hsi2c_1: hsi2c@14e50000 { status = "disabled"; }; - hsi2c_2: hsi2c@14e60000 { + hsi2c_2: i2c@14e60000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14e60000 0x1000>; interrupts = ; @@ -1624,7 +1624,7 @@ hsi2c_2: hsi2c@14e60000 { status = "disabled"; }; - hsi2c_3: hsi2c@14e70000 { + hsi2c_3: i2c@14e70000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14e70000 0x1000>; interrupts = ; @@ -1637,7 +1637,7 @@ hsi2c_3: hsi2c@14e70000 { status = "disabled"; }; - hsi2c_4: hsi2c@14ec0000 { + hsi2c_4: i2c@14ec0000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14ec0000 0x1000>; interrupts = ; @@ -1650,7 +1650,7 @@ hsi2c_4: hsi2c@14ec0000 { status = "disabled"; }; - hsi2c_5: hsi2c@14ed0000 { + hsi2c_5: i2c@14ed0000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14ed0000 0x1000>; interrupts = ; @@ -1663,7 +1663,7 @@ hsi2c_5: hsi2c@14ed0000 { status = "disabled"; }; - hsi2c_6: hsi2c@14ee0000 { + hsi2c_6: i2c@14ee0000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14ee0000 0x1000>; interrupts = ; @@ -1676,7 +1676,7 @@ hsi2c_6: hsi2c@14ee0000 { status = "disabled"; }; - hsi2c_7: hsi2c@14ef0000 { + hsi2c_7: i2c@14ef0000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14ef0000 0x1000>; interrupts = ; @@ -1689,7 +1689,7 @@ hsi2c_7: hsi2c@14ef0000 { status = "disabled"; }; - hsi2c_8: hsi2c@14d90000 { + hsi2c_8: i2c@14d90000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14d90000 0x1000>; interrupts = ; @@ -1702,7 +1702,7 @@ hsi2c_8: hsi2c@14d90000 { status = "disabled"; }; - hsi2c_9: hsi2c@14da0000 { + hsi2c_9: i2c@14da0000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14da0000 0x1000>; interrupts = ; @@ -1715,7 +1715,7 @@ hsi2c_9: hsi2c@14da0000 { status = "disabled"; }; - hsi2c_10: hsi2c@14de0000 { + hsi2c_10: i2c@14de0000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14de0000 0x1000>; interrupts = ; @@ -1728,7 +1728,7 @@ hsi2c_10: hsi2c@14de0000 { status = "disabled"; }; - hsi2c_11: hsi2c@14df0000 { + hsi2c_11: i2c@14df0000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14df0000 0x1000>; interrupts = ; diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi index c73a597ca66e..c3efbc8add38 100644 --- a/arch/arm64/boot/dts/exynos/exynos7.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi @@ -359,7 +359,7 @@ pinctrl_bus1: pinctrl@14870000 { interrupts = ; }; - hsi2c_0: hsi2c@13640000 { + hsi2c_0: i2c@13640000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x13640000 0x1000>; interrupts = ; @@ -372,7 +372,7 @@ hsi2c_0: hsi2c@13640000 { status = "disabled"; }; - hsi2c_1: hsi2c@13650000 { + hsi2c_1: i2c@13650000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x13650000 0x1000>; interrupts = ; @@ -385,7 +385,7 @@ hsi2c_1: hsi2c@13650000 { status = "disabled"; }; - hsi2c_2: hsi2c@14e60000 { + hsi2c_2: i2c@14e60000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14e60000 0x1000>; interrupts = ; @@ -398,7 +398,7 @@ hsi2c_2: hsi2c@14e60000 { status = "disabled"; }; - hsi2c_3: hsi2c@14e70000 { + hsi2c_3: i2c@14e70000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14e70000 0x1000>; interrupts = ; @@ -411,7 +411,7 @@ hsi2c_3: hsi2c@14e70000 { status = "disabled"; }; - hsi2c_4: hsi2c@13660000 { + hsi2c_4: i2c@13660000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x13660000 0x1000>; interrupts = ; @@ -424,7 +424,7 @@ hsi2c_4: hsi2c@13660000 { status = "disabled"; }; - hsi2c_5: hsi2c@13670000 { + hsi2c_5: i2c@13670000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x13670000 0x1000>; interrupts = ; @@ -437,7 +437,7 @@ hsi2c_5: hsi2c@13670000 { status = "disabled"; }; - hsi2c_6: hsi2c@14e00000 { + hsi2c_6: i2c@14e00000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14e00000 0x1000>; interrupts = ; @@ -450,7 +450,7 @@ hsi2c_6: hsi2c@14e00000 { status = "disabled"; }; - hsi2c_7: hsi2c@13e10000 { + hsi2c_7: i2c@13e10000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x13e10000 0x1000>; interrupts = ; @@ -463,7 +463,7 @@ hsi2c_7: hsi2c@13e10000 { status = "disabled"; }; - hsi2c_8: hsi2c@14e20000 { + hsi2c_8: i2c@14e20000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x14e20000 0x1000>; interrupts = ; @@ -476,7 +476,7 @@ hsi2c_8: hsi2c@14e20000 { status = "disabled"; }; - hsi2c_9: hsi2c@13680000 { + hsi2c_9: i2c@13680000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x13680000 0x1000>; interrupts = ; @@ -489,7 +489,7 @@ hsi2c_9: hsi2c@13680000 { status = "disabled"; }; - hsi2c_10: hsi2c@13690000 { + hsi2c_10: i2c@13690000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x13690000 0x1000>; interrupts = ; @@ -502,7 +502,7 @@ hsi2c_10: hsi2c@13690000 { status = "disabled"; }; - hsi2c_11: hsi2c@136a0000 { + hsi2c_11: i2c@136a0000 { compatible = "samsung,exynos7-hsi2c"; reg = <0x136a0000 0x1000>; interrupts = ;