Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_MACH_REALTEK_RTL) += cisco_sg220-26.dtb
dtb-$(CONFIG_MACH_REALTEK_RTL) += cameo-rtl9302c-2x-rtl8224-2xge.dtb
@@ -0,0 +1,169 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/dts-v1/;
#include "rtl9302c.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/thermal/thermal.h>
/ {
compatible = "cameo,rtl9302c-2x-rtl8224-2xge", "realtek,rtl9302-soc";
model = "RTL9302C Development Board";
memory@0 {
device_type = "memory";
reg = <0x0 0x8000000>;
};
chosen {
stdout-path = "serial0:115200n8";
};
};
&uart0 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "LOADER";
reg = <0x0 0xe0000>;
read-only;
};
partition@e0000 {
label = "BDINFO";
reg = <0xe0000 0x10000>;
};
partition@f0000 {
label = "SYSINFO";
reg = <0xf0000 0x10000>;
read-only;
};
partition@100000 {
label = "JFFS2 CFG";
reg = <0x100000 0x100000>;
};
partition@200000 {
label = "JFFS2 LOG";
reg = <0x200000 0x100000>;
};
partition@300000 {
label = "RUNTIME";
reg = <0x300000 0xe80000>;
};
partition@1180000 {
label = "RUNTIME2";
reg = <0x1180000 0xe80000>;
};
};
};
};
&mdio0 {
/* External RTL8224 */
phy0: ethernet-phy@0 {
reg = <0>;
compatible = "ethernet-phy-ieee802.3-c45";
};
phy1: ethernet-phy@1 {
reg = <1>;
compatible = "ethernet-phy-ieee802.3-c45";
};
phy2: ethernet-phy@2 {
reg = <2>;
compatible = "ethernet-phy-ieee802.3-c45";
};
phy3: ethernet-phy@3 {
reg = <3>;
compatible = "ethernet-phy-ieee802.3-c45";
};
};
&mdio1 {
/* External RTL8224 */
phy4: ethernet-phy@0 {
reg = <0>;
compatible = "ethernet-phy-ieee802.3-c45";
};
phy5: ethernet-phy@1 {
reg = <1>;
compatible = "ethernet-phy-ieee802.3-c45";
};
phy6: ethernet-phy@2 {
reg = <2>;
compatible = "ethernet-phy-ieee802.3-c45";
};
phy7: ethernet-phy@3 {
reg = <3>;
compatible = "ethernet-phy-ieee802.3-c45";
};
};
&switch0 {
ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
phy-handle = <&phy0>;
phy-mode = "usxgmii";
};
port@1 {
reg = <1>;
phy-handle = <&phy1>;
phy-mode = "usxgmii";
};
port@2 {
reg = <2>;
phy-handle = <&phy2>;
phy-mode = "usxgmii";
};
port@3 {
reg = <3>;
phy-handle = <&phy3>;
phy-mode = "usxgmii";
};
port@16 {
reg = <16>;
phy-handle = <&phy4>;
phy-mode = "usxgmii";
};
port@17 {
reg = <17>;
phy-handle = <&phy5>;
phy-mode = "usxgmii";
};
port@18 {
reg = <18>;
phy-handle = <&phy6>;
phy-mode = "usxgmii";
};
port@19 {
reg = <19>;
phy-handle = <&phy7>;
phy-mode = "usxgmii";
};
port@24{
reg = <24>;
phy-mode = "10gbase-r";
};
port@25{
reg = <25>;
phy-mode = "10gbase-r";
};
};
};
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
/dts-v1/;
#include "rtl838x.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ {
model = "Cisco SG220-26";
compatible = "cisco,sg220-26", "realtek,rtl8382-soc";
chosen {
stdout-path = "serial0:9600n8";
bootargs = "earlycon console=ttyS0,9600";
};
memory@0 {
device_type = "memory";
reg = <0x0 0x8000000>;
};
gpio-restart {
compatible = "gpio-restart";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
priority = <192>;
open-source;
};
};
&uart0 {
status = "okay";
};
@@ -0,0 +1,129 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
/ {
#address-cells = <1>;
#size-cells = <1>;
aliases {
serial0 = &uart0;
serial1 = &uart1;
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
device_type = "cpu";
compatible = "mips,mips4KEc";
reg = <0>;
clocks = <&baseclk>;
};
};
baseclk: baseclk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <500000000>;
};
cpuintc: cpuintc {
compatible = "mti,cpu-interrupt-controller";
#address-cells = <0>;
#interrupt-cells = <1>;
interrupt-controller;
};
lx_clk: clock-lexra {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <200000000>;
};
soc@18000000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x18000000 0x10000>;
spi0: spi@1200 {
compatible = "realtek,rtl8380-spi";
reg = <0x1200 0x100>;
#address-cells = <1>;
#size-cells = <0>;
};
uart0: serial@2000 {
compatible = "ns16550a";
reg = <0x2000 0x100>;
clocks = <&lx_clk>;
interrupt-parent = <&intc>;
interrupts = <31>;
reg-io-width = <1>;
reg-shift = <2>;
fifo-size = <1>;
no-loopback-test;
status = "disabled";
};
uart1: serial@2100 {
compatible = "ns16550a";
reg = <0x2100 0x100>;
clocks = <&lx_clk>;
interrupt-parent = <&intc>;
interrupts = <30>;
reg-io-width = <1>;
reg-shift = <2>;
fifo-size = <1>;
no-loopback-test;
status = "disabled";
};
intc: interrupt-controller@3000 {
compatible = "realtek,rtl8380-intc", "realtek,rtl-intc";
reg = <0x3000 0x20>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpuintc>;
interrupts = <2>, <3>, <4>, <5>, <6>;
};
watchdog: watchdog@3150 {
compatible = "realtek,rtl8380-wdt";
reg = <0x3150 0xc>;
realtek,reset-mode = "soc";
clocks = <&lx_clk>;
timeout-sec = <20>;
interrupt-parent = <&intc>;
interrupt-names = "phase1", "phase2";
interrupts = <19>, <18>;
};
gpio0: gpio@3500 {
compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
reg = <0x3500 0x1c>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <24>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&intc>;
interrupts = <23>;
};
};
};
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
#include "rtl930x.dtsi"
&switch0 {
compatible = "realtek,rtl9302c-switch", "syscon", "simple-mfd";
};
&i2c0 {
compatible = "realtek,rtl9302c-i2c", "realtek,rtl9301-i2c";
};
&i2c1 {
compatible = "realtek,rtl9302c-i2c", "realtek,rtl9301-i2c";
};
@@ -0,0 +1,217 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
/ {
compatible = "realtek,rtl9302-soc";
#address-cells = <1>;
#size-cells = <1>;
aliases {
serial0 = &uart0;
serial1 = &uart1;
};
cpuintc: cpuintc {
compatible = "mti,cpu-interrupt-controller";
#address-cells = <0>;
#interrupt-cells = <1>;
interrupt-controller;
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
device_type = "cpu";
compatible = "mips,mips34Kc";
reg = <0>;
clocks = <&baseclk>;
};
};
baseclk: clock-800mhz {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <800000000>;
};
lx_clk: clock-175mhz {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <175000000>;
};
switch0: switch@1b000000 {
compatible = "realtek,rtl9301-switch", "syscon", "simple-mfd";
reg = <0x1b000000 0x10000>;
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&intc>;
interrupts = <23>, <24>;
interrupt-names = "switch", "nic";
reboot@c {
compatible = "syscon-reboot";
reg = <0x0c 0x4>;
value = <0x01>;
};
i2c0: i2c@36c {
compatible = "realtek,rtl9301-i2c";
reg = <0x36c 0x14>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
i2c1: i2c@388 {
compatible = "realtek,rtl9301-i2c";
reg = <0x388 0x14>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
mdio_controller: mdio-controller@ca00 {
compatible = "realtek,rtl9301-mdio";
reg = <0xca00 0x200>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
mdio0: mdio-bus@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
mdio1: mdio-bus@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
mdio2: mdio-bus@2 {
reg = <2>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
mdio3: mdio-bus@3 {
reg = <3>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};
};
soc: soc@18000000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x18000000 0x20000>;
intc: interrupt-controller@3000 {
compatible = "realtek,rtl9300-intc", "realtek,rtl-intc";
reg = <0x3000 0x18>, <0x3018 0x18>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpuintc>;
interrupts = <2>, <3>, <4>, <5>, <6>, <7>;
};
spi0: spi@1200 {
compatible = "realtek,rtl8380-spi";
reg = <0x1200 0x100>;
#address-cells = <1>;
#size-cells = <0>;
};
timer0: timer@3200 {
compatible = "realtek,rtl9302-timer", "realtek,otto-timer";
reg = <0x3200 0x10>, <0x3210 0x10>, <0x3220 0x10>,
<0x3230 0x10>, <0x3240 0x10>;
interrupt-parent = <&intc>;
interrupts = <7>, <8>, <9>, <10>, <11>;
clocks = <&lx_clk>;
};
watchdog0: watchdog@3260 {
compatible = "realtek,rtl9300-wdt";
reg = <0x3260 0xc>;
realtek,reset-mode = "soc";
clocks = <&lx_clk>;
timeout-sec = <30>;
interrupt-parent = <&intc>;
interrupt-names = "phase1", "phase2";
interrupts = <5>, <6>;
};
gpio0: gpio@3300 {
compatible = "realtek,rtl9300-gpio", "realtek,otto-gpio";
reg = <0x3300 0x1c>, <0x3338 0x8>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <24>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&intc>;
interrupts = <13>;
};
snand: spi@1a400 {
compatible = "realtek,rtl9301-snand";
reg = <0x1a400 0x44>;
interrupt-parent = <&intc>;
interrupts = <19>;
clocks = <&lx_clk>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
uart0: serial@2000 {
compatible = "ns16550a";
reg = <0x2000 0x100>;
clocks = <&lx_clk>;
interrupt-parent = <&intc>;
interrupts = <30>;
reg-io-width = <1>;
reg-shift = <2>;
fifo-size = <1>;
no-loopback-test;
status = "disabled";
};
uart1: serial@2100 {
compatible = "ns16550a";
reg = <0x2100 0x100>;
clocks = <&lx_clk>;
interrupt-parent = <&intc>;
interrupts = <31>;
reg-io-width = <1>;
reg-shift = <2>;
fifo-size = <1>;
no-loopback-test;
status = "disabled";
};
};
};