From nobody Sat Nov 30 16:46:52 2024 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 5BFFF1173F for ; Mon, 9 Sep 2024 01:47:24 +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=1725846447; cv=none; b=ZRQS5IPxMs0erxFB6qnF7vY+2RZTAFtSXAzvYV7113znSy90FhsishUIrotaED22Ni5QDsMAXR+93Fq20tNWvUXN9jAL4DoMXySowhOlNzFDvf/9sksnT+YpE4WmxnqJxwN5ojFqpFxC2P7mwx2vHrKr+Sg3zl9FkPixc1V4nsM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725846447; c=relaxed/simple; bh=+aoFoOM56dVAPgrGpnd/j/lHdz7Si4yDqNJxwC+lZzk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JnZ8kcfd5Zn+xvuYtIv1fDMKbmAV6O5Z9bzE6B6vgKs5NeQnG+Htp+wnPu/Zt9chovEGd9NJLdf19LfluySBBgW8zu3bahi2xuWhEEqrw1RhhINQh6gmJikUCqVdSzOB/sm85mH7sOY6k0ZquX8+0wk9YXvziVE3zn9LcEMIj4g= 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=eETF3mLZ; 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="eETF3mLZ" 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 80BF12C02A5; Mon, 9 Sep 2024 13:47:16 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1725846436; bh=+zog77n3+6cdHWXMsHomzjiH+/wTr0SUd1Y1NuyMJGQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eETF3mLZQ82BBxLGzgvy6ndpU6lkgwWFerCJndxafprzL2bwOCFUo+OCniIV8O+yp u7/l+NjADDGC6zGH4pHfH6ckRQrz1ep6QF7rpXsXIerrCHtEHfBTibZI9P7s7GZ+K4 Dn09yihN6IgSRhw+I9+vMUc0G33Nw9sK/B7d0VbnP7jV6WctyLh818CXT5gzon9GDx rwpDDsQ2BeyTX27wg1EF2uJ0cPRBtf0a/Q7EnFGA58Ph5Hvip3GG/5AxqHFNn5DIL+ xrZ2l9ulg8bLITAGwSb9f4XlqcrtcHNLWYkpSJU8p6DuK8R7pmVgLeOlOIT8/Qxljk ZDvOyXP9DCjbg== 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 ; Mon, 09 Sep 2024 13:47:16 +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 4385D13EE4F; Mon, 9 Sep 2024 13:47:16 +1200 (NZST) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id 4062528031B; Mon, 9 Sep 2024 13:47:16 +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 1/2] dt-bindings: mfd: Add Realtek switch Date: Mon, 9 Sep 2024 13:47:06 +1200 Message-ID: <20240909014707.2003091-2-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240909014707.2003091-1-chris.packham@alliedtelesis.co.nz> References: <20240909014707.2003091-1-chris.packham@alliedtelesis.co.nz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SEG-SpamProfiler-Analysis: v=2.4 cv=KIj5D0Fo c=1 sm=1 tr=0 ts=66de53a4 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=EaEq8P2WXUwA:10 a=gEfo2CItAAAA:8 a=bBF1cVFT1NsCJIh9SSUA:9 a=3ZKOabzyN94A:10 a=lodiqALd0UDFbPdo5Gsx:22 a=sptkURWiP4Gy88Gu7hUp:22 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat Content-Type: text/plain; charset="utf-8" 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 --- .../bindings/mfd/realtek,switch.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/realtek,switch.ya= ml diff --git a/Documentation/devicetree/bindings/mfd/realtek,switch.yaml b/Do= cumentation/devicetree/bindings/mfd/realtek,switch.yaml new file mode 100644 index 000000000000..84b57f87bd3a --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/realtek,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,switch.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Realtek Switch with Internal CPU + +description: + The RTL9302 ethernet switch has an internal CPU. The switch is a multi-p= ort + networking switch that supports many interfaces. Additionally, the devic= e can + support MDIO, SPI and I2C busses. + +maintainers: + - Chris Packham + +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: + - | + switch0: ethernet-switch@1b000000 { + compatible =3D "realtek,rtl9302c-switch", "syscon", "simple-mfd"; + reg =3D <0x1b000000 0x10000>; + + reboot { + compatible =3D "syscon-reboot"; + offset =3D <0x0c>; + value =3D <0x01>; + }; + }; + --=20 2.46.0 From nobody Sat Nov 30 16:46:52 2024 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 5E45D12B64 for ; Mon, 9 Sep 2024 01:47:24 +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=1725846446; cv=none; b=giZEQQu8RWaphhPZjuxhfm5Es/LLYcDegEV3wi3duqM9WjaZZseHJF4Gst5QyLWTKtbT20Kpcaq+rhJhHVa5RV3wNMoiHRyqyX83Xb7ef7NKZpudR5mR6C4bIHkuLWt2Ijgv0UZ9xNP/9tlI9LkP9TJTFwzIC7TXdpruVFo1o1o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725846446; c=relaxed/simple; bh=L9TNAtnBy3nR64TFNqaXVI/oToOp2YKmFJxlvG3+790=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NtLEIyRfmermftorB2IyFzWtLWNqBqSHi0UdEfGhb9SqZGWzSLh+XclKkCp30IoKzVACYzsuNT8wBZeRRdsmNQmS/Iw8tI1m/cLjZkQfbRe6HfW8hClVgPXCEtOGCiFoUthEWF5ndD8WNbqIljao95qSTkPVRlVX5DvPdOVhNbc= 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=CNHcsxLv; 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="CNHcsxLv" 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 903F12C0517; Mon, 9 Sep 2024 13:47:16 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1725846436; bh=gpkGo77cm18FSmg2ftRjYbF+hAbg60pgDNCScLTabCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CNHcsxLvGlXkLcsuoRKfSgbfzCyeSF7oGxoVF1UNYjG7GkM4KgaVrpyXcyVr+9fUF 1OVaq6hPAxE9RmoUcjhsgxRUWbQzXmsa/ixpEuRJR4n1ACWXWcWfPQ6+yliyVM1UnM 4AXJGdPlZVCueqIDiV0eatXCD5ovCNuJeo58CFPsIrf9WwRckejbdnv0FQKX7xpUqD 8w8DIWfS2cvTopX3+tGG5vUnghUUn1Is0s0umpecfCLe1/UEK5swG4+dJVAK1cC+0x UQTyHJxC6YEPtzhNzqe3yJ4sc859emIiWj4txsNEpW1MSLvdkxgSRU8q1EF+xK7+F0 +7qIHNMnFz3/A== 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 ; Mon, 09 Sep 2024 13:47:16 +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 451C213EE84; Mon, 9 Sep 2024 13:47:16 +1200 (NZST) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id 4227A28056E; Mon, 9 Sep 2024 13:47:16 +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 2/2] mips: dts: realtek: Add syscon-reboot node Date: Mon, 9 Sep 2024 13:47:07 +1200 Message-ID: <20240909014707.2003091-3-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240909014707.2003091-1-chris.packham@alliedtelesis.co.nz> References: <20240909014707.2003091-1-chris.packham@alliedtelesis.co.nz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SEG-SpamProfiler-Analysis: v=2.4 cv=KIj5D0Fo c=1 sm=1 tr=0 ts=66de53a4 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=EaEq8P2WXUwA:10 a=oSNYpAVFohJLBMLz1HQA:9 a=3ZKOabzyN94A:10 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat Content-Type: text/plain; charset="utf-8" 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 --- .../dts/realtek/cameo-rtl9302c-2x-rtl8224-2xge.dts | 3 +++ arch/mips/boot/dts/realtek/rtl930x.dtsi | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/arch/mips/boot/dts/realtek/cameo-rtl9302c-2x-rtl8224-2xge.dts = b/arch/mips/boot/dts/realtek/cameo-rtl9302c-2x-rtl8224-2xge.dts index 77d2566545f2..a517135446a3 100644 --- a/arch/mips/boot/dts/realtek/cameo-rtl9302c-2x-rtl8224-2xge.dts +++ b/arch/mips/boot/dts/realtek/cameo-rtl9302c-2x-rtl8224-2xge.dts @@ -71,3 +71,6 @@ partition@1180000 { }; }; }; +&switch0 { + status =3D "okay"; +}; diff --git a/arch/mips/boot/dts/realtek/rtl930x.dtsi b/arch/mips/boot/dts/r= ealtek/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 =3D <0>; clock-frequency =3D <175000000>; }; + + switch0: switch@1b000000 { + compatible =3D "realtek,rtl9302c-switch", "syscon", "simple-mfd"; + reg =3D <0x1b000000 0x10000>; + + reboot { + compatible =3D "syscon-reboot"; + offset =3D <0x0c>; + value =3D <0x01>; + }; + }; }; =20 &soc { --=20 2.46.0