From patchwork Thu Apr 17 12:01:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Zi X-Patchwork-Id: 882722 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0EE0245039; Thu, 17 Apr 2025 12:02:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744891325; cv=none; b=gdMaizGM8iM4iEd79wTzMbsKz8mdYdcifVfbNco0V2A8LG6x++OhNjCQkr31aGXtwY6ofoMwyfvYVMd+n/Je+Is3EM7Ds9v39+jAdEPBlTTEF6gyvDUIOxAfvqLOhRdhNAOHaaMa9DhQr1RC7sNZhploPbt4w2IsaVFE4qeh+dM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744891325; c=relaxed/simple; bh=JrgG1E6WF4FOY3BbNVxmDrHICSeGOa0nq70lXCt28ac=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R3N+Gd1KKFS1rAjLryKP3VRCKXrflnA5gQGjgfOa6T+jTLBmIPiraSHhcbQs0IsLkH/7UYCfK2AxHIX+SjRKmS8n+n4oShUQK8BuhljgvDf/SXxsI7yY2tMM8UPTEn7mMXwYLg4y+RNTo2lAGowz1VGABczE7ypdKg3MxSvvNUI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=YN6/i7fl; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="YN6/i7fl" Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 0DE3525BBE; Thu, 17 Apr 2025 14:02:02 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id MS4_IJQQwXiT; Thu, 17 Apr 2025 14:02:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1744891321; bh=JrgG1E6WF4FOY3BbNVxmDrHICSeGOa0nq70lXCt28ac=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=YN6/i7flNPMgHAVVUnttrb7MppoY87tMLYhjGfx5F9+fdb0qvzTMuWsl0e2iD9yPa f12KLX475jI68cnDree0Cr8ZQR+mgPiRR/lAwSnNiXKYvp/5ySXfHF/1Nc5eKOnRJ8 PuyhHxqeVyGCUilcppp4UEUfleR8C3C7Knyf5hXA+cXD/JuSCoasEHoW2e75WCdyTF 953iNc+mQYT9w+SKZZ2Ntg3kYse2G+x0afHV2xTX9/NFccK4mjPymh6MgRNQoIjWOA TVmcUkEwwZMHPg01Rz7N9m0ltEgwYTwJTwyRodQcav1j08McAjv2hsuaUXfxSuTKuW 2fEKzWDvt61Ig== From: Yao Zi To: Heiko Stuebner , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonas Karlman , Yao Zi , Chukun Pan Cc: linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Conor Dooley Subject: [PATCH v2 1/3] dt-bindings: i2c: i2c-rk3x: Add compatible string for RK3528 Date: Thu, 17 Apr 2025 12:01:17 +0000 Message-ID: <20250417120118.17610-4-ziyao@disroot.org> In-Reply-To: <20250417120118.17610-3-ziyao@disroot.org> References: <20250417120118.17610-3-ziyao@disroot.org> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Document I2C controllers integrated in RK3528, which are compatible with the RK3399 variant. Signed-off-by: Yao Zi Reviewed-by: Heiko Stuebner Acked-by: Conor Dooley Reviewed-by: Andi Shyti --- Documentation/devicetree/bindings/i2c/i2c-rk3x.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-rk3x.yaml b/Documentation/devicetree/bindings/i2c/i2c-rk3x.yaml index 8101afa6f146..2f1e97969c3f 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-rk3x.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-rk3x.yaml @@ -37,6 +37,7 @@ properties: - rockchip,px30-i2c - rockchip,rk3308-i2c - rockchip,rk3328-i2c + - rockchip,rk3528-i2c - rockchip,rk3562-i2c - rockchip,rk3568-i2c - rockchip,rk3576-i2c From patchwork Thu Apr 17 12:01:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Zi X-Patchwork-Id: 882051 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CD5A248871; Thu, 17 Apr 2025 12:02:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744891330; cv=none; b=PJPCxUtpbhjTftujoEdxCmLyM7aYjZTFrJz7AoWSwQE+iWDWE3fSMC/MP4MmDC15HwB3DWYFLUzHEuwQNR0/j1X076b5zdmKUhf7KHmqlCoFMpNIfoJIwH+3Vhs5Am4peEbTXWOUWs5btSa4q5Ppu31mNnCzt9ZtxpP0lRmRsaY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744891330; c=relaxed/simple; bh=WVUl5TJqOF4iM4ohSNDgaQTgAIPG8NeRelFthy8N2R8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZyCMjriYzEwfiHD3jMvP71ovb+/wGp+Dc6Q+vZos93d3262NcRJZZqGGDFC55hQIUrIL9fvov1K4iVcinssMDYk0ya6c3H+hrpYNsTYQltTn3d1uzBjcBM/RvSCFFNIEzqJvaybvy+T0HQ/xeKcWGiQf16r9QSom7ZaaUqthVeQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=HNN6S2PM; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="HNN6S2PM" Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 0DAD825DB0; Thu, 17 Apr 2025 14:02:07 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Al1Luu8f9c42; Thu, 17 Apr 2025 14:02:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1744891326; bh=WVUl5TJqOF4iM4ohSNDgaQTgAIPG8NeRelFthy8N2R8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=HNN6S2PMTA66w5dH7hKgrlnTk55qDret6b0aa3NHUxFwOsoilX0nrqt5SHa2We4+N NTcT/n9xXlHbX6runkpD3Ztm9g01YWb1tZTyj1SzmnydvLePX9l1y8ycBEb07GeuWX tr4ub0qRn+9ElRpOZRi/qy35vrT/vmCr9PGcuM6ELkm81nuW1X5yePOYkeKUWz1aoR pT/p8X+VcdhFglCuD4XxFXbwtQq7pneQ0a3sZcgwnR8RbutJUN2Gnn85FVN74F1SBf cU3SXo8vosrmOFvyEaEZUys8aT1Z/0jTIp/sLtO/UQihcD1VmDnTNG6nZ4xASmy3x4 8xgRUk09Z41LQ== From: Yao Zi To: Heiko Stuebner , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonas Karlman , Yao Zi , Chukun Pan Cc: linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] arm64: dts: rockchip: Add I2C controllers for RK3528 Date: Thu, 17 Apr 2025 12:01:18 +0000 Message-ID: <20250417120118.17610-5-ziyao@disroot.org> In-Reply-To: <20250417120118.17610-3-ziyao@disroot.org> References: <20250417120118.17610-3-ziyao@disroot.org> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Describe I2C controllers shipped by RK3528 in devicetree. For I2C-2, I2C-4 and I2C-7 which come with only a set of possible pins, a default pin configuration is included. Signed-off-by: Yao Zi --- arch/arm64/boot/dts/rockchip/rk3528.dtsi | 110 +++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3528.dtsi b/arch/arm64/boot/dts/rockchip/rk3528.dtsi index 826f9be0be19..2c9780069af9 100644 --- a/arch/arm64/boot/dts/rockchip/rk3528.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3528.dtsi @@ -24,6 +24,14 @@ aliases { gpio2 = &gpio2; gpio3 = &gpio3; gpio4 = &gpio4; + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c2 = &i2c2; + i2c3 = &i2c3; + i2c4 = &i2c4; + i2c5 = &i2c5; + i2c6 = &i2c6; + i2c7 = &i2c7; serial0 = &uart0; serial1 = &uart1; serial2 = &uart2; @@ -465,6 +473,108 @@ uart7: serial@ffa28000 { status = "disabled"; }; + i2c0: i2c@ffa50000 { + compatible = "rockchip,rk3528-i2c", + "rockchip,rk3399-i2c"; + reg = <0x0 0xffa50000 0x0 0x1000>; + clocks = <&cru CLK_I2C0>, <&cru PCLK_I2C0>; + clock-names = "i2c", "pclk"; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c1: i2c@ffa58000 { + compatible = "rockchip,rk3528-i2c", + "rockchip,rk3399-i2c"; + reg = <0x0 0xffa58000 0x0 0x1000>; + clocks = <&cru CLK_I2C1>, <&cru PCLK_I2C1>; + clock-names = "i2c", "pclk"; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c2: i2c@ffa60000 { + compatible = "rockchip,rk3528-i2c", + "rockchip,rk3399-i2c"; + reg = <0x0 0xffa60000 0x0 0x1000>; + clocks = <&cru CLK_I2C2>, <&cru PCLK_I2C2>; + clock-names = "i2c", "pclk"; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&i2c2m1_xfer>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c3: i2c@ffa68000 { + compatible = "rockchip,rk3528-i2c", + "rockchip,rk3399-i2c"; + reg = <0x0 0xffa68000 0x0 0x1000>; + clocks = <&cru CLK_I2C3>, <&cru PCLK_I2C3>; + clock-names = "i2c", "pclk"; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c4: i2c@ffa70000 { + compatible = "rockchip,rk3528-i2c", + "rockchip,rk3399-i2c"; + reg = <0x0 0xffa70000 0x0 0x1000>; + clocks = <&cru CLK_I2C4>, <&cru PCLK_I2C4>; + clock-names = "i2c", "pclk"; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&i2c4_xfer>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c5: i2c@ffa78000 { + compatible = "rockchip,rk3528-i2c", + "rockchip,rk3399-i2c"; + reg = <0x0 0xffa78000 0x0 0x1000>; + clocks = <&cru CLK_I2C5>, <&cru PCLK_I2C5>; + clock-names = "i2c", "pclk"; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c6: i2c@ffa80000 { + compatible = "rockchip,rk3528-i2c", + "rockchip,rk3399-i2c"; + reg = <0x0 0xffa80000 0x0 0x1000>; + clocks = <&cru CLK_I2C6>, <&cru PCLK_I2C6>; + clock-names = "i2c", "pclk"; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c7: i2c@ffa88000 { + compatible = "rockchip,rk3528-i2c", + "rockchip,rk3399-i2c"; + reg = <0x0 0xffa88000 0x0 0x1000>; + clocks = <&cru CLK_I2C7>, <&cru PCLK_I2C7>; + clock-names = "i2c", "pclk"; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&i2c7_xfer>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + saradc: adc@ffae0000 { compatible = "rockchip,rk3528-saradc"; reg = <0x0 0xffae0000 0x0 0x10000>; From patchwork Thu Apr 17 12:01:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Zi X-Patchwork-Id: 882721 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F93124A042; Thu, 17 Apr 2025 12:02:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744891334; cv=none; b=XadWkl9Rv2y+5oI8kCchEpcYKP+z8aW9uIp8cNlxmaL0/MGWWm0Kiz6ag5xfBp1xxkmGpjmMzCgNbFU6OOmM7O7G11sY+NTUBsV2T7osDNwoAYax3zw21aexVUe2fn9gqii3Job4B03VwW/rrNbg3mBX5BlMA24cfAjhBvp0VLE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744891334; c=relaxed/simple; bh=6ZXpOpKFXe3BQmkcz2CtFn5gZTsYclZ9GbD4T6xOKbg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JczrSAXovPJnJsfm+WFJ/Xq2zZTZPsj9vrLE+d3aJ75Jf9lnc29H46l/mbk88MlxU0w0aTL7pm8JdgoJzSjbeULyrym2OfRXOVvgBMs85SHsUVpyAeZzkGdgiluzYXYVkRJd4g67cLvgRfYNcRPNKxxQKEgrft9SzM749OdWWwE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=lgc1Ii9q; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="lgc1Ii9q" Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id D18A925DFF; Thu, 17 Apr 2025 14:02:10 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id RTLTMcTzHm4d; Thu, 17 Apr 2025 14:02:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1744891330; bh=6ZXpOpKFXe3BQmkcz2CtFn5gZTsYclZ9GbD4T6xOKbg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=lgc1Ii9q+HCq0tjO48u2cSjz4lhYMGVyVIMDSO6MRA67ndnRauaK9TG3tDkwVQbB9 uJEYAJGAlL3+CLPSC0rxF4BXuJuH4YtY4aHemKLf/mArgpb9Xtoh981ORsFWZfd/P/ uRJR8Dk9Tm5moIfbFNcO6+/5ajtEYrDiT/AiWe8tvAr/UMeKAeQ97ZRwRYO3Eo1O3i Dkh7MLvi2z/tHiBuAoTAkGG1giLyTa9AGiP4jTFo4ciswujMBxllwjqIHAAcHVD9nB 22m7bEHlbH4jU8okBEr8mZ7cNzAQUPbVZK3UGd4zUAxJlkT4Aot8glBxQa1+Lb+UxS E0vpi2H/D2AJQ== From: Yao Zi To: Heiko Stuebner , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonas Karlman , Yao Zi , Chukun Pan Cc: linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] arm64: dts: rockchip: Add onboard EEPROM for Radxa E20C Date: Thu, 17 Apr 2025 12:01:19 +0000 Message-ID: <20250417120118.17610-6-ziyao@disroot.org> In-Reply-To: <20250417120118.17610-3-ziyao@disroot.org> References: <20250417120118.17610-3-ziyao@disroot.org> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Radxa E20C ships an onboard I2C EEPROM for storing production information. Enable it in devicetree. Signed-off-by: Yao Zi --- arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts index 57a446b5cbd6..6e77f7753ff7 100644 --- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts @@ -110,6 +110,20 @@ vcc5v0_sys: regulator-5v0-vcc-sys { }; }; +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1m0_xfer>; + status = "okay"; + + eeprom@50 { + compatible = "belling,bl24c16a", "atmel,24c16"; + reg = <0x50>; + pagesize = <16>; + read-only; + vcc-supply = <&vcc_3v3>; + }; +}; + &pinctrl { gpio-keys { user_key: user-key {