From patchwork Mon Sep 23 22:57:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 13809986 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [202.36.163.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DF5C2E419 for ; Mon, 23 Sep 2024 22:57:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.36.163.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727132248; cv=none; b=dEUQT0SPKwd0jNEvIXyouSLGN45hDT3T7aPcPQdcAJ/dT8hzyiNnZ6WIjsNgNisAyPwEG624GMggkAbuRZFiX/DyaNm2PBwNIK/d1WiHMyJbLgaEY9pYJrvsOgrj4vT6AFOadmJbtxVBb+Du/yT/CuECgzhB2OCz681FjZ1QP8E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727132248; c=relaxed/simple; bh=alzAKM7GjraxAKGNRQzzS1bm3jhDdeY2QlPPbu54nE8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k8B+1ss3ra4WLsOKvFpJMshqMSJbVgZUPufxu7bNQ1sQTf30j4AWJzusEau5+KSrahfCQk0lXcY5X5lJ38eMjUuXZK/mDhwsTB/6Vetx0Admw+UsMSEQGCgTusHGhTNv8JnXqJjHQuVSKA1aMSU6f1liu6kpZ2eMs3eVhscLnqM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz; spf=pass smtp.mailfrom=alliedtelesis.co.nz; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b=tI8gOPsJ; arc=none smtp.client-ip=202.36.163.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alliedtelesis.co.nz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b="tI8gOPsJ" Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 2D04D2C05DB; Tue, 24 Sep 2024 10:57:23 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1727132243; bh=r/SysA06cz+g/+g/douOrBfp/O7mBxLIyC8pNuisR9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tI8gOPsJidq0wIziJrA1sxJzUzeY83ihXOQeYS4W3W4GbMrazm+X9Q25tlX3bpalL Vh/rVcuJVkDcy4bALEloXRQii0oei+/Tp4lIyJtJNT9koXzKVvxlmhiMTprlCAPNEV 1E4+Oukoqb3wDfKjDHpVua3uxUx1AZBjnmdTrVzgwdHMASIbPiNjqkqo6XKqZQ81Bh o2nvWGz6ETtrTNFSl7W/pJE+M47JfHpkOKlUJxboxn/ll/FxNxYHlIuvD/wQIZP8ve 4kFeJFuna9Uw3wzksFaHhuPqO/+VFwDtCh2B55zul0g0I1yu/PXfEc+KzH7rw3sprd fcIIzCOZBd3vQ== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Tue, 24 Sep 2024 10:57:22 +1200 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by pat.atlnz.lc (Postfix) with ESMTP id F378513EE56; Tue, 24 Sep 2024 10:57:22 +1200 (NZST) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id EE053280960; Tue, 24 Sep 2024 10:57:22 +1200 (NZST) From: Chris Packham To: lee@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, tsbogend@alpha.franken.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, Chris Packham Subject: [PATCH v4 1/3] dt-bindings: mfd: Add Realtek switch Date: Tue, 24 Sep 2024 10:57:17 +1200 Message-ID: <20240923225719.2999821-2-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240923225719.2999821-1-chris.packham@alliedtelesis.co.nz> References: <20240923225719.2999821-1-chris.packham@alliedtelesis.co.nz> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SEG-SpamProfiler-Analysis: v=2.4 cv=Id0kWnqa c=1 sm=1 tr=0 ts=66f1f252 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=EaEq8P2WXUwA:10 a=gEfo2CItAAAA:8 a=RqFMS8Kk0ItR_bseB4sA:9 a=3ZKOabzyN94A:10 a=lodiqALd0UDFbPdo5Gsx:22 a=sptkURWiP4Gy88Gu7hUp:22 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat Add device tree schema for the Realtek switch. Currently the only supported feature is the syscon-reboot which is needed to be able to reboot the board. Signed-off-by: Chris Packham Reviewed-by: Krzysztof Kozlowski --- Notes: Changes in v3: - fix schema id to match filename Changes in v2: - use filename that matches the compatible - put maintainers after title - remove unnecessary label in example - Rework description to focus on what is implemented rather than what may be implemented in the future. .../bindings/mfd/realtek,rtl9302c-switch.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml diff --git a/Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml b/Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml new file mode 100644 index 000000000000..2d20dd07a7e9 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/realtek,rtl9302c-switch.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Realtek Switch with Internal CPU + +maintainers: + - Chris Packham + +description: + The RTL9302 is an Ethernet switch with an integrated CPU. A number of + different peripherals are accessed through a common register block, + represented here as a syscon node. + +properties: + compatible: + items: + - enum: + - realtek,rtl9302c-switch + - const: syscon + - const: simple-mfd + + reg: + maxItems: 1 + + reboot: + $ref: /schemas/power/reset/syscon-reboot.yaml# + +required: + - compatible + - reg + - reboot + +additionalProperties: false + +examples: + - | + ethernet-switch@1b000000 { + compatible = "realtek,rtl9302c-switch", "syscon", "simple-mfd"; + reg = <0x1b000000 0x10000>; + + reboot { + compatible = "syscon-reboot"; + offset = <0x0c>; + value = <0x01>; + }; + }; + From patchwork Mon Sep 23 22:57:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 13809988 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [202.36.163.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABF26126C14 for ; Mon, 23 Sep 2024 22:57:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.36.163.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727132249; cv=none; b=Z6YZJUQ5uUWGN75DKfjGTV2pkLZEAQGsIEe8bKeXOQusm1WoHJOG5xP8ECPjbxZr51sbC5m/XHH2Ovj9OBeWHra0s4yK4GSooo6ijppgt1eNKHW3Uqfot6te6ehqOrhrW6Z6PhCoVeCPUePEWPUrgC3OKYsw3jUvUY++vRUcv7g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727132249; c=relaxed/simple; bh=kiaUERNi7FEMa0DTaZm84QrpQQft/7yi3856MUwyh6M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ekYA2thpVnV9KGYD8zHD77RXJmc0iqoWo5Zwc7YdQAt0FPYeUl6KaujB+Y3SwliHrWX159PLDN2eK+DfELoZMabyA6Q4JzyFb8kjcEpQkt0LydUTDbXTksxmNh47yIn9X+YAtIX+Kngiqi4byQrPgW4+WHf+otyEHxr0EFary+Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz; spf=pass smtp.mailfrom=alliedtelesis.co.nz; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b=jRRDLwoI; arc=none smtp.client-ip=202.36.163.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alliedtelesis.co.nz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b="jRRDLwoI" Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 5279F2C062F; Tue, 24 Sep 2024 10:57:23 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1727132243; bh=6JCffrXjBW+Wl+ZcE0nsaWc7MZMZ3P1777f6qTIS7V8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jRRDLwoITz+WYD58Fo8eefrcGxFJF08BZWHVXj0FKpJG3bbE8bBmvgYGKdCtNu2bl Y+3o2fjhKoU6xFzu00mIAKvm03I9jaaUQhJWdbFdIbrsfrHngE9MmMVJhpJ39dNbJm PCbE0ULunCDXYDvRQYIwpaNby32I4EBcstIuVvz1u0UVJiza46jo1jPbSLgHMvCKCE lp8Avq9QtuOXuQ9ti978V8fxwIpjJf9j7M0rIPe2f/APGRiMAQVU25Z6PCIMXzcSxO R0tnEAnfbCzD9WR8oBWdMR+A7hFUXAAARmku48+b9wX5XdlVfvdx+gxsp5WHKo32xr Ezs5MRTeohVPg== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Tue, 24 Sep 2024 10:57:23 +1200 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by pat.atlnz.lc (Postfix) with ESMTP id 0501713EE36; Tue, 24 Sep 2024 10:57:23 +1200 (NZST) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id F38A3280960; Tue, 24 Sep 2024 10:57:22 +1200 (NZST) From: Chris Packham To: lee@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, tsbogend@alpha.franken.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, Chris Packham Subject: [PATCH v4 2/3] mips: dts: realtek: Add syscon-reboot node Date: Tue, 24 Sep 2024 10:57:18 +1200 Message-ID: <20240923225719.2999821-3-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240923225719.2999821-1-chris.packham@alliedtelesis.co.nz> References: <20240923225719.2999821-1-chris.packham@alliedtelesis.co.nz> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SEG-SpamProfiler-Analysis: v=2.4 cv=Id0kWnqa c=1 sm=1 tr=0 ts=66f1f253 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=EaEq8P2WXUwA:10 a=dg6lvUh7t3K6jr6pP5MA:9 a=3ZKOabzyN94A:10 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat The board level reset on systems using the RTL9302 can be driven via the switch. Use a syscon-reboot node to represent this. Signed-off-by: Chris Packham Reviewed-by: Krzysztof Kozlowski --- Notes: Changes in v3: - None Changes in v2: - drop redundant status = "okay" arch/mips/boot/dts/realtek/rtl930x.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/mips/boot/dts/realtek/rtl930x.dtsi b/arch/mips/boot/dts/realtek/rtl930x.dtsi index f271940f82be..cf1b38b6c353 100644 --- a/arch/mips/boot/dts/realtek/rtl930x.dtsi +++ b/arch/mips/boot/dts/realtek/rtl930x.dtsi @@ -29,6 +29,17 @@ lx_clk: clock-175mhz { #clock-cells = <0>; clock-frequency = <175000000>; }; + + switch0: switch@1b000000 { + compatible = "realtek,rtl9302c-switch", "syscon", "simple-mfd"; + reg = <0x1b000000 0x10000>; + + reboot { + compatible = "syscon-reboot"; + offset = <0x0c>; + value = <0x01>; + }; + }; }; &soc { From patchwork Mon Sep 23 22:57:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 13809987 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [202.36.163.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD45D126C1D for ; Mon, 23 Sep 2024 22:57:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.36.163.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727132248; cv=none; b=aj5hwqoUMrkro2+Xv0LvdUq0VtbCPh0l4VmtivL0JWj+3uAm2D9/gC9LpZvlJ3TIGxP+eoqpMNdzm21GxzXpndfUpvbcHYyBa8Gv1vW66oP85qPr7+7zm+icyBypHxf43dXcheg6mXnwhBKWpT0XuNGhM/sGusqPArQ3FZWT17I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727132248; c=relaxed/simple; bh=EbnVLx57027FowiGZ2tAUiI9ulPHqKSPwbQfoqRhDVY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DQl6l5dTP2lNvc6wbuCfC5EEoaVYaTQ2vNSyoLSKDbJYSOqSE53PD18Neo2uXvUZVq9IpUVDwygziO3/8P3HkBlogv5qYoq4DBXM1eeEbP/0N/4AENXnqUrLuWAGgYK2fVxyjkMCJewLe41Hoeh5yPMO3TlL8filREdPBoYPAEY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz; spf=pass smtp.mailfrom=alliedtelesis.co.nz; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b=NE5qcTUQ; arc=none smtp.client-ip=202.36.163.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alliedtelesis.co.nz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b="NE5qcTUQ" Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 423FE2C0613; Tue, 24 Sep 2024 10:57:23 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1727132243; bh=HntQRhLdGZ3zqOBGA94v/e1rM6aolDz4a97biFSUOJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NE5qcTUQ5TXDt1PnXSD3duxnh8IIPmjR9tak7LlliPixQnGsFIdydk7+x1mf1i9Gb SzF/mbENZn0xUR4/QczA0Kh4HOSpaurYsYHSbmzZz5MybLprhvqdsuB0zioGYMD+4c BkmK72j2ukG5bLcaGKgVQHsZdjfQ+mOMipW7wTvYY11rcyzVupIAbxJS/3cINS8cCX lo6cUrk/s78uPx+R7FXV/HrOfOY2NYImynPjKQXD0z3cxxH4Ly4O2iNezLVFJ5pznY MW3PFvdrsnQVjyYa7celYkoa7dWrAshRwu2CV10WAudDMiM5IuHbRglajnKudCAA2n Pmbv3cSPmfcGw== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Tue, 24 Sep 2024 10:57:23 +1200 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by pat.atlnz.lc (Postfix) with ESMTP id 068E713EE56; Tue, 24 Sep 2024 10:57:23 +1200 (NZST) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id 0347E280E29; Tue, 24 Sep 2024 10:57:23 +1200 (NZST) From: Chris Packham To: lee@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, tsbogend@alpha.franken.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, Chris Packham Subject: [PATCH v4 3/3] dt-bindings: mfd: Add more RTL9300 variants Date: Tue, 24 Sep 2024 10:57:19 +1200 Message-ID: <20240923225719.2999821-4-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240923225719.2999821-1-chris.packham@alliedtelesis.co.nz> References: <20240923225719.2999821-1-chris.packham@alliedtelesis.co.nz> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SEG-SpamProfiler-Analysis: v=2.4 cv=Id0kWnqa c=1 sm=1 tr=0 ts=66f1f253 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=EaEq8P2WXUwA:10 a=NGg2wX1vYba99ZzXuQ8A:9 a=3ZKOabzyN94A:10 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat Add the RTL9301, RTL9300B and RTL9303. These have the same SoC as the RTL9302C but differ in the Ethernet switch/SERDES arrangement. Signed-off-by: Chris Packham --- Notes: Changes in v4: - New .../devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml b/Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml index 2d20dd07a7e9..a3ba6d9bacaa 100644 --- a/Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml +++ b/Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml @@ -18,7 +18,10 @@ properties: compatible: items: - enum: + - realtek,rtl9301-switch + - realtek,rtl9302b-switch - realtek,rtl9302c-switch + - realtek,rtl9303-switch - const: syscon - const: simple-mfd