mirror of
				https://github.com/immortalwrt/immortalwrt.git
				synced 2025-10-30 07:49:55 +08:00 
			
		
		
		
	 8758b58f25
			
		
	
	8758b58f25
	
	
	
		
			
			Add relevant nodes for NPU support for Airoha AN7583 and enable the kernel config to enable support in the Airoha Ethernet driver. NPU firmware is scheduled to be upstreamed to linux-firmware and will be added once present upstream. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
		
			
				
	
	
		
			845 lines
		
	
	
		
			17 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			845 lines
		
	
	
		
			17 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 | |
| 
 | |
| #include <dt-bindings/interrupt-controller/irq.h>
 | |
| #include <dt-bindings/interrupt-controller/arm-gic.h>
 | |
| #include <dt-bindings/clock/en7523-clk.h>
 | |
| #include <dt-bindings/phy/phy.h>
 | |
| #include <dt-bindings/reset/airoha,an7583-reset.h>
 | |
| #include <dt-bindings/leds/common.h>
 | |
| #include <dt-bindings/thermal/thermal.h>
 | |
| 
 | |
| / {
 | |
| 	interrupt-parent = <&gic>;
 | |
| 	#address-cells = <2>;
 | |
| 	#size-cells = <2>;
 | |
| 
 | |
| 	reserved-memory {
 | |
| 		#address-cells = <2>;
 | |
| 		#size-cells = <2>;
 | |
| 		ranges;
 | |
| 
 | |
| 		atf@80000000 {
 | |
| 			no-map;
 | |
| 			reg = <0x0 0x80000000 0x0 0x200000>;
 | |
| 		};
 | |
| 
 | |
| 		npu_binary: npu-binary@84000000 {
 | |
| 			no-map;
 | |
| 			reg = <0x0 0x84000000 0x0 0xa00000>;
 | |
| 		};
 | |
| 
 | |
| 		qdma0_buf: qdma0-buf@87000000 {
 | |
| 			no-map;
 | |
| 			reg = <0x0 0x87000000 0x0 0x2000000>;
 | |
| 		};
 | |
| 
 | |
| 		qdma1_buf: qdma1-buf@89000000 {
 | |
| 			no-map;
 | |
| 			reg = <0x0 0x89000000 0x0 0x1000000>;
 | |
| 		};
 | |
| 	};
 | |
| 
 | |
| 	psci {
 | |
| 		compatible = "arm,psci-1.0";
 | |
| 		method = "smc";
 | |
| 	};
 | |
| 
 | |
| 	cpus {
 | |
| 		#address-cells = <1>;
 | |
| 		#size-cells = <0>;
 | |
| 
 | |
| 		cpu-map {
 | |
| 			cluster0 {
 | |
| 				core0 {
 | |
| 					cpu = <&cpu0>;
 | |
| 				};
 | |
| 
 | |
| 				core1 {
 | |
| 					cpu = <&cpu1>;
 | |
| 				};
 | |
| 			};
 | |
| 		};
 | |
| 
 | |
| 		cpu0: cpu@0 {
 | |
| 			device_type = "cpu";
 | |
| 			compatible = "arm,cortex-a53";
 | |
| 			reg = <0x0>;
 | |
| 			operating-points-v2 = <&cpu_opp_table>;
 | |
| 			enable-method = "psci";
 | |
| 			clocks = <&cpufreq>;
 | |
| 			clock-names = "cpu";
 | |
| 			power-domains = <&cpufreq>;
 | |
| 			power-domain-names = "perf";
 | |
| 			next-level-cache = <&l2>;
 | |
| 			#cooling-cells = <2>;
 | |
| 		};
 | |
| 
 | |
| 		cpu1: cpu@1 {
 | |
| 			device_type = "cpu";
 | |
| 			compatible = "arm,cortex-a53";
 | |
| 			reg = <0x1>;
 | |
| 			operating-points-v2 = <&cpu_opp_table>;
 | |
| 			enable-method = "psci";
 | |
| 			clocks = <&cpufreq>;
 | |
| 			clock-names = "cpu";
 | |
| 			power-domains = <&cpufreq>;
 | |
| 			power-domain-names = "perf";
 | |
| 			next-level-cache = <&l2>;
 | |
| 			#cooling-cells = <2>;
 | |
| 		};
 | |
| 
 | |
| 		l2: l2-cache {
 | |
| 			compatible = "cache";
 | |
| 			cache-size = <0x80000>;
 | |
| 			cache-line-size = <64>;
 | |
| 			cache-level = <2>;
 | |
| 			cache-unified;
 | |
| 		};
 | |
| 	};
 | |
| 
 | |
| 	cpufreq: cpufreq {
 | |
| 		compatible = "airoha,en7581-cpufreq";
 | |
| 
 | |
| 		operating-points-v2 = <&cpu_smcc_opp_table>;
 | |
| 
 | |
| 		#power-domain-cells = <0>;
 | |
| 		#clock-cells = <0>;
 | |
| 	};
 | |
| 
 | |
| 	cpu_opp_table: opp-table {
 | |
| 		compatible = "operating-points-v2";
 | |
| 		opp-shared;
 | |
| 
 | |
| 		opp-500000000 {
 | |
| 			opp-hz = /bits/ 64 <500000000>;
 | |
| 			required-opps = <&smcc_opp0>;
 | |
| 		};
 | |
| 
 | |
| 		opp-550000000 {
 | |
| 			opp-hz = /bits/ 64 <550000000>;
 | |
| 			required-opps = <&smcc_opp1>;
 | |
| 		};
 | |
| 
 | |
| 		opp-600000000 {
 | |
| 			opp-hz = /bits/ 64 <600000000>;
 | |
| 			required-opps = <&smcc_opp2>;
 | |
| 		};
 | |
| 
 | |
| 		opp-650000000 {
 | |
| 			opp-hz = /bits/ 64 <650000000>;
 | |
| 			required-opps = <&smcc_opp3>;
 | |
| 		};
 | |
| 
 | |
| 		opp-7000000000 {
 | |
| 			opp-hz = /bits/ 64 <700000000>;
 | |
| 			required-opps = <&smcc_opp4>;
 | |
| 		};
 | |
| 
 | |
| 		opp-7500000000 {
 | |
| 			opp-hz = /bits/ 64 <750000000>;
 | |
| 			required-opps = <&smcc_opp5>;
 | |
| 		};
 | |
| 
 | |
| 		opp-8000000000 {
 | |
| 			opp-hz = /bits/ 64 <800000000>;
 | |
| 			required-opps = <&smcc_opp6>;
 | |
| 		};
 | |
| 
 | |
| 		opp-8500000000 {
 | |
| 			opp-hz = /bits/ 64 <850000000>;
 | |
| 			required-opps = <&smcc_opp7>;
 | |
| 		};
 | |
| 
 | |
| 		opp-9000000000 {
 | |
| 			opp-hz = /bits/ 64 <900000000>;
 | |
| 			required-opps = <&smcc_opp8>;
 | |
| 		};
 | |
| 
 | |
| 		opp-9500000000 {
 | |
| 			opp-hz = /bits/ 64 <950000000>;
 | |
| 			required-opps = <&smcc_opp9>;
 | |
| 		};
 | |
| 
 | |
| 		opp-10000000000 {
 | |
| 			opp-hz = /bits/ 64 <1000000000>;
 | |
| 			required-opps = <&smcc_opp10>;
 | |
| 		};
 | |
| 
 | |
| 		opp-10500000000 {
 | |
| 			opp-hz = /bits/ 64 <1050000000>;
 | |
| 			required-opps = <&smcc_opp11>;
 | |
| 		};
 | |
| 
 | |
| 		opp-11000000000 {
 | |
| 			opp-hz = /bits/ 64 <1100000000>;
 | |
| 			required-opps = <&smcc_opp12>;
 | |
| 		};
 | |
| 
 | |
| 		opp-11500000000 {
 | |
| 			opp-hz = /bits/ 64 <1150000000>;
 | |
| 			required-opps = <&smcc_opp13>;
 | |
| 		};
 | |
| 
 | |
| 		opp-12000000000 {
 | |
| 			opp-hz = /bits/ 64 <1200000000>;
 | |
| 			required-opps = <&smcc_opp14>;
 | |
| 		};
 | |
| 	};
 | |
| 
 | |
| 	cpu_smcc_opp_table: opp-table-cpu-smcc {
 | |
| 		compatible = "operating-points-v2";
 | |
| 
 | |
| 		smcc_opp0: opp0 {
 | |
| 			opp-level = <0>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp1: opp1 {
 | |
| 			opp-level = <1>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp2: opp2 {
 | |
| 			opp-level = <2>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp3: opp3 {
 | |
| 			opp-level = <3>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp4: opp4 {
 | |
| 			opp-level = <4>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp5: opp5 {
 | |
| 			opp-level = <5>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp6: opp6 {
 | |
| 			opp-level = <6>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp7: opp7 {
 | |
| 			opp-level = <7>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp8: opp8 {
 | |
| 			opp-level = <8>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp9: opp9 {
 | |
| 			opp-level = <9>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp10: opp10 {
 | |
| 			opp-level = <10>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp11: opp11 {
 | |
| 			opp-level = <11>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp12: opp12 {
 | |
| 			opp-level = <12>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp13: opp13 {
 | |
| 			opp-level = <13>;
 | |
| 		};
 | |
| 
 | |
| 		smcc_opp14: opp14 {
 | |
| 			opp-level = <14>;
 | |
| 		};
 | |
| 	};
 | |
| 
 | |
| 	timer {
 | |
| 		compatible = "arm,armv8-timer";
 | |
| 		interrupt-parent = <&gic>;
 | |
| 		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
 | |
| 			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
 | |
| 			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
 | |
| 			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
 | |
| 	};
 | |
| 
 | |
| 	thermal-zones {
 | |
| 		cpu_thermal: cpu-thermal {
 | |
| 			polling-delay-passive = <10000>;
 | |
| 			polling-delay = <5000>;
 | |
| 
 | |
| 			thermal-sensors = <&thermal 0>;
 | |
| 
 | |
| 			trips {
 | |
| 				cpu_hot: cpu-hot {
 | |
| 					temperature = <95000>;
 | |
| 					hysteresis = <1000>;
 | |
| 					type = "hot";
 | |
| 				};
 | |
| 
 | |
| 				cpu-critical {
 | |
| 					temperature = <110000>;
 | |
| 					hysteresis = <1000>;
 | |
| 					type = "critical";
 | |
| 				};
 | |
| 			};
 | |
| 
 | |
| 			cooling-maps {
 | |
| 				map0 {
 | |
| 					trip = <&cpu_hot>;
 | |
| 					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
 | |
| 							 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
 | |
| 				};
 | |
| 			};
 | |
| 		};
 | |
| 	};
 | |
| 
 | |
| 	clk25m: oscillator {
 | |
| 		compatible = "fixed-clock";
 | |
| 		#clock-cells = <0>;
 | |
| 		clock-frequency = <25000000>;
 | |
| 		clock-output-names = "clkxtal";
 | |
| 	};
 | |
| 
 | |
| 	sys_hclk: clk-oscillator-100mhz {
 | |
| 		compatible = "fixed-clock";
 | |
| 		#clock-cells = <0>;
 | |
| 		clock-frequency = <100000000>;
 | |
| 		clock-output-names = "sys_hclk";
 | |
| 	};
 | |
| 
 | |
| 	vmmc_3v3: regulator-vmmc-3v3 {
 | |
| 		compatible = "regulator-fixed";
 | |
| 		regulator-name = "vmmc";
 | |
| 		regulator-min-microvolt = <3300000>;
 | |
| 		regulator-max-microvolt = <3300000>;
 | |
| 		regulator-always-on;
 | |
| 	};
 | |
| 
 | |
| 	sfp1: sfp1 {
 | |
| 		compatible = "sff,sfp";
 | |
| 	};
 | |
| 
 | |
| 	sfp2: sfp2 {
 | |
| 		compatible = "sff,sfp";
 | |
| 	};
 | |
| 
 | |
| 	soc {
 | |
| 		compatible = "simple-bus";
 | |
| 		#address-cells = <2>;
 | |
| 		#size-cells = <2>;
 | |
| 		ranges;
 | |
| 
 | |
| 		gic: interrupt-controller@9000000 {
 | |
| 			compatible = "arm,gic-v3";
 | |
| 			interrupt-controller;
 | |
| 			#interrupt-cells = <3>;
 | |
| 			#address-cells = <1>;
 | |
| 			#size-cells = <1>;
 | |
| 			reg = <0x0 0x09000000 0x0 0x20000>,
 | |
| 			      <0x0 0x09080000 0x0 0x80000>,
 | |
| 			      <0x0 0x09400000 0x0 0x2000>,
 | |
| 			      <0x0 0x09500000 0x0 0x2000>,
 | |
| 			      <0x0 0x09600000 0x0 0x20000>;
 | |
| 			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
 | |
| 		};
 | |
| 
 | |
| 		chip_scu: syscon@1fa20000 {
 | |
| 			compatible = "airoha,en7581-chip-scu", "syscon", "simple-mfd";
 | |
| 			reg = <0x0 0x1fa20000 0x0 0x388>;
 | |
| 
 | |
| 			thermal: thermal {
 | |
| 				compatible = "airoha,an7583-thermal";
 | |
| 
 | |
| 				#thermal-sensor-cells = <0>;
 | |
| 			};
 | |
| 		};
 | |
| 
 | |
| 		pbus_csr: syscon@1fbe3400 {
 | |
| 			compatible = "airoha,en7581-pbus-csr", "syscon";
 | |
| 			reg = <0x0 0x1fbe3400 0x0 0xff>;
 | |
| 		};
 | |
| 
 | |
| 		scuclk: system-controller@1fa20000 {
 | |
| 			compatible = "airoha,an7583-scu", "syscon";
 | |
| 			reg = <0x0 0x1fb00000 0x0 0x970>;
 | |
| 
 | |
| 			#address-cells = <1>;
 | |
| 			#size-cells = <0>;
 | |
| 
 | |
| 			#clock-cells = <1>;
 | |
| 			#reset-cells = <1>;
 | |
| 
 | |
| 			airoha,chip-scu = <&chip_scu>;
 | |
| 
 | |
| 			mdio_0: mdio-bus@c8 {
 | |
| 				compatible = "airoha,an7583-mdio";
 | |
| 				reg = <0xc8>;
 | |
| 
 | |
| 				clocks = <&scuclk AN7583_CLK_MDIO0>;
 | |
| 				resets = <&scuclk AN7583_MDIO0>;
 | |
| 			};
 | |
| 
 | |
| 			mdio_1: mdio-bus@cc {
 | |
| 				compatible = "airoha,an7583-mdio";
 | |
| 				reg = <0xcc>;
 | |
| 
 | |
| 				clocks = <&scuclk AN7583_CLK_MDIO1>;
 | |
| 				resets = <&scuclk AN7583_MDIO1>;
 | |
| 			};
 | |
| 		};
 | |
| 
 | |
| 		system-controller@1fbf0200 {
 | |
| 			compatible = "syscon", "simple-mfd";
 | |
| 			reg = <0x0 0x1fbf0200 0x0 0xc0>;
 | |
| 
 | |
| 			an7583_pinctrl: pinctrl {
 | |
| 				compatible = "airoha,an7583-pinctrl";
 | |
| 
 | |
| 				interrupt-parent = <&gic>;
 | |
| 				interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
 | |
| 
 | |
| 				gpio-controller;
 | |
| 				#gpio-cells = <2>;
 | |
| 
 | |
| 				interrupt-controller;
 | |
| 				#interrupt-cells = <2>;
 | |
| 			};
 | |
| 		};
 | |
| 
 | |
| 		i2cclock: i2cclock@0 {
 | |
| 			#clock-cells = <0>;
 | |
| 			compatible = "fixed-clock";
 | |
| 
 | |
| 			/* 20 MHz */
 | |
| 			clock-frequency = <20000000>;
 | |
| 		};
 | |
| 
 | |
| 		i2c0: i2c0@1fbf8000 {
 | |
| 			compatible = "airoha,an7581-i2c";
 | |
| 			reg = <0x0 0x1fbf8000 0x0 0x100>;
 | |
| 
 | |
| 			clocks = <&i2cclock>;
 | |
| 
 | |
| 			/* 100 kHz */
 | |
| 			clock-frequency = <100000>;
 | |
| 			#address-cells = <1>;
 | |
| 			#size-cells = <0>;
 | |
| 
 | |
| 			status = "disable";
 | |
| 		};
 | |
| 
 | |
| 		i2c1: i2c1@1fbf8100 {
 | |
| 			compatible = "airoha,an7581-i2c";
 | |
| 			reg = <0x0 0x1fbf8100 0x0 0x100>;
 | |
| 
 | |
| 			clocks = <&i2cclock>;
 | |
| 
 | |
| 			/* 100 kHz */
 | |
| 			clock-frequency = <100000>;
 | |
| 			#address-cells = <1>;
 | |
| 			#size-cells = <0>;
 | |
| 
 | |
| 			status = "disable";
 | |
| 		};
 | |
| 
 | |
| 		mmc0: mmc@1fa0e000 {
 | |
| 			compatible = "mediatek,mt7622-mmc";
 | |
| 			reg = <0x0 0x1fa0e000 0x0 0x1000>,
 | |
| 			      <0x0 0x1fa0c000 0x0 0x60>;
 | |
| 			interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
 | |
| 			clocks = <&scuclk EN7581_CLK_EMMC>, <&clk25m>;
 | |
| 			clock-names = "source", "hclk";
 | |
| 			bus-width = <4>;
 | |
| 			max-frequency = <52000000>;
 | |
| 			vmmc-supply = <&vmmc_3v3>;
 | |
| 			disable-wp;
 | |
| 			cap-mmc-highspeed;
 | |
| 			non-removable;
 | |
| 
 | |
| 			status = "disabled";
 | |
| 		};
 | |
| 
 | |
| 		snfi: spi@1fa10000 {
 | |
| 			compatible = "airoha,en7581-snand";
 | |
| 			reg = <0x0 0x1fa10000 0x0 0x140>,
 | |
| 			      <0x0 0x1fa11000 0x0 0x160>;
 | |
| 
 | |
| 			clocks = <&scuclk EN7523_CLK_SPI>;
 | |
| 			clock-names = "spi";
 | |
| 
 | |
| 			#address-cells = <1>;
 | |
| 			#size-cells = <0>;
 | |
| 
 | |
| 			status = "disabled";
 | |
| 
 | |
| 			spi_nand: nand@0 {
 | |
| 				compatible = "spi-nand";
 | |
| 				reg = <0>;
 | |
| 				spi-max-frequency = <50000000>;
 | |
| 				spi-tx-bus-width = <1>;
 | |
| 				spi-rx-bus-width = <2>;
 | |
| 			};
 | |
| 		};
 | |
| 
 | |
| 		uart1: serial@1fbf0000 {
 | |
| 			compatible = "ns16550";
 | |
| 			reg = <0x0 0x1fbf0000 0x0 0x30>;
 | |
| 			reg-io-width = <4>;
 | |
| 			reg-shift = <2>;
 | |
| 			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
 | |
| 			clock-frequency = <1843200>;
 | |
| 		};
 | |
| 
 | |
| 		watchdog@1fbf0100 {
 | |
| 			compatible = "airoha,en7581-wdt";
 | |
| 			reg = <0x0 0x1fbf0100 0x0 0x38>;
 | |
| 
 | |
| 			clocks = <&sys_hclk>;
 | |
| 			clock-names = "bus";
 | |
| 		};
 | |
| 
 | |
| 		uart2: serial@1fbf0300 {
 | |
| 			compatible = "airoha,en7523-uart";
 | |
| 			reg = <0x0 0x1fbf0300 0x0 0x30>;
 | |
| 			reg-io-width = <4>;
 | |
| 			reg-shift = <2>;
 | |
| 			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
 | |
| 			clock-frequency = <7372800>;
 | |
| 
 | |
| 			status = "disabled";
 | |
| 		};
 | |
| 
 | |
| 		hsuart3: serial@1fbe1000 {
 | |
| 			compatible = "airoha,en7523-uart";
 | |
| 			reg = <0x0 0x1fbe1000 0x0 0x40>;
 | |
| 			reg-io-width = <4>;
 | |
| 			reg-shift = <2>;
 | |
| 			interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
 | |
| 			clock-frequency = <7372800>;
 | |
| 
 | |
| 			status = "disabled";
 | |
| 		};
 | |
| 
 | |
| 		uart4: serial@1fbf0600 {
 | |
| 			compatible = "airoha,en7523-uart";
 | |
| 			reg = <0x0 0x1fbf0600 0x0 0x30>;
 | |
| 			reg-io-width = <4>;
 | |
| 			reg-shift = <2>;
 | |
| 			interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
 | |
| 			clock-frequency = <7372800>;
 | |
| 
 | |
| 			status = "disabled";
 | |
| 		};
 | |
| 
 | |
| 		uart5: serial@1fbf0700 {
 | |
| 			compatible = "airoha,en7523-uart";
 | |
| 			reg = <0x0 0x1fbf0700 0x0 0x30>;
 | |
| 			reg-io-width = <4>;
 | |
| 			reg-shift = <2>;
 | |
| 			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
 | |
| 			clock-frequency = <7372800>;
 | |
| 
 | |
| 			status = "disabled";
 | |
| 		};
 | |
| 
 | |
| 		crypto@1e004000 {
 | |
| 			compatible = "inside-secure,safexcel-eip93ies";
 | |
| 			reg = <0x0 0x1fb70000 0x0 0x1000>;
 | |
| 
 | |
| 			interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
 | |
| 		};
 | |
| 
 | |
| 		npu: npu@1e900000 {
 | |
| 			compatible = "airoha,an7583-npu";
 | |
| 			reg = <0x0 0x1e900000 0x0 0x313000>;
 | |
| 			interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
 | |
| 			memory-region = <&npu_binary>;
 | |
| 			memory-region-names = "binary";
 | |
| 
 | |
| 			status = "disabled";
 | |
| 		};
 | |
| 
 | |
| 		pon_pcs: pcs@1fa08000 {
 | |
| 			compatible = "airoha,an7583-pcs-pon";
 | |
| 			reg = <0x0 0x1fa08000 0x0 0x1000>,
 | |
| 			      <0x0 0x1fa80000 0x0 0x60>,
 | |
| 			      <0x0 0x1fa80a00 0x0 0x164>,
 | |
| 			      <0x0 0x1fa84000 0x0 0x450>,
 | |
| 			      <0x0 0x1fa85900 0x0 0x338>,
 | |
| 			      <0x0 0x1fa86000 0x0 0x300>,
 | |
| 			      <0x0 0x1fa8f000 0x0 0x1000>,
 | |
| 			      <0x0 0x1fa8e000 0x0 0x1000>;
 | |
| 			reg-names = "xfi_mac", "hsgmii_an", "hsgmii_pcs",
 | |
| 				    "multi_sgmii", "usxgmii",
 | |
| 				    "hsgmii_rate_adp", "xfi_ana", "xfi_pma";
 | |
| 
 | |
| 			resets = <&scuclk AN7583_XPON_MAC_RST>,
 | |
| 				 <&scuclk AN7583_XPON_PHY_RST>,
 | |
| 				 <&scuclk AN7583_XPON_XFI_RST>;
 | |
| 			reset-names = "mac", "phy", "xfi";
 | |
| 
 | |
| 			airoha,scu = <&scuclk>;
 | |
| 		};
 | |
| 
 | |
| 		eth_pcs: pcs@1fa09000 {
 | |
| 			compatible = "airoha,an7583-pcs-eth";
 | |
| 			reg = <0x0 0x1fa09000 0x0 0x1000>,
 | |
| 			      <0x0 0x1fa70000 0x0 0x60>,
 | |
| 			      <0x0 0x1fa70a00 0x0 0x164>,
 | |
| 			      <0x0 0x1fa74000 0x0 0x450>,
 | |
| 			      <0x0 0x1fa75900 0x0 0x338>,
 | |
| 			      <0x0 0x1fa76000 0x0 0x300>,
 | |
| 			      <0x0 0x1fa7f000 0x0 0x1000>,
 | |
| 			      <0x0 0x1fa7e000 0x0 0x1000>;
 | |
| 			reg-names = "xfi_mac", "hsgmii_an", "hsgmii_pcs",
 | |
| 				    "multi_sgmii", "usxgmii",
 | |
| 				    "hsgmii_rate_adp", "xfi_ana", "xfi_pma";
 | |
| 
 | |
| 			resets = <&scuclk AN7583_XSI_MAC_RST>,
 | |
| 				 <&scuclk AN7583_XSI_PHY_RST>;
 | |
| 			reset-names = "mac", "phy";
 | |
| 
 | |
| 			airoha,scu = <&scuclk>;
 | |
| 		};
 | |
| 
 | |
| 		eth: ethernet@1fb50000 {
 | |
| 			compatible = "airoha,an7583-eth";
 | |
| 			reg = <0 0x1fb50000 0 0x2600>,
 | |
| 			      <0 0x1fb54000 0 0x2000>,
 | |
| 			      <0 0x1fb56000 0 0x2000>;
 | |
| 			reg-names = "fe", "qdma0", "qdma1";
 | |
| 
 | |
| 			resets = <&scuclk AN7583_FE_RST>,
 | |
| 				 <&scuclk AN7583_FE_PDMA_RST>,
 | |
| 				 <&scuclk AN7583_FE_QDMA_RST>,
 | |
| 				 <&scuclk AN7583_DUAL_HSI0_MAC_RST>,
 | |
| 				 <&scuclk AN7583_DUAL_HSI1_MAC_RST>,
 | |
| 				 <&scuclk AN7583_XFP_MAC_RST>;
 | |
| 			reset-names = "fe", "pdma", "qdma",
 | |
| 				      "hsi0-mac", "hsi1-mac",
 | |
| 				      "xfp-mac";
 | |
| 
 | |
| 			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
 | |
| 				     <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
 | |
| 
 | |
| 			memory-region = <&qdma0_buf>, <&qdma1_buf>;
 | |
| 			memory-region-names = "qdma0-buf", "qdma1-buf";
 | |
| 
 | |
| 			airoha,npu = <&npu>;
 | |
| 
 | |
| 			status = "disabled";
 | |
| 
 | |
| 			#address-cells = <1>;
 | |
| 			#size-cells = <0>;
 | |
| 
 | |
| 			gdm1: ethernet@1 {
 | |
| 				compatible = "airoha,eth-mac";
 | |
| 				reg = <1>;
 | |
| 				phy-mode = "internal";
 | |
| 				status = "disabled";
 | |
| 
 | |
| 				fixed-link {
 | |
| 					speed = <10000>;
 | |
| 					full-duplex;
 | |
| 					pause;
 | |
| 				};
 | |
| 			};
 | |
| 
 | |
| 			gdm2: ethernet@2 {
 | |
| 				compatible = "airoha,eth-mac";
 | |
| 				reg = <2>;
 | |
| 				pcs = <&pon_pcs>;
 | |
| 
 | |
| 				status = "disabled";
 | |
| 			};
 | |
| 
 | |
| 			gdm3: ethernet@3 {
 | |
| 				compatible = "airoha,eth-mac";
 | |
| 				reg = <3>;
 | |
| 				pcs = <ð_pcs>;
 | |
| 				airoha,gdm-srcport = <0x16>;
 | |
| 
 | |
| 				status = "disabled";
 | |
| 			};
 | |
| 		};
 | |
| 
 | |
| 		switch: switch@1fb58000 {
 | |
| 			compatible = "airoha,an7583-switch";
 | |
| 			reg = <0 0x1fb58000 0 0x8000>;
 | |
| 			resets = <&scuclk AN7583_GSW_RST>;
 | |
| 
 | |
| 			interrupt-controller;
 | |
| 			#interrupt-cells = <1>;
 | |
| 			interrupt-parent = <&gic>;
 | |
| 			interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
 | |
| 
 | |
| 			status = "disabled";
 | |
| 
 | |
| 			#address-cells = <1>;
 | |
| 			#size-cells = <1>;
 | |
| 
 | |
| 			ports {
 | |
| 				#address-cells = <1>;
 | |
| 				#size-cells = <0>;
 | |
| 
 | |
| 				gsw_port1: port@1 {
 | |
| 					reg = <1>;
 | |
| 					label = "lan1";
 | |
| 					phy-mode = "internal";
 | |
| 					phy-handle = <&gsw_phy1>;
 | |
| 				};
 | |
| 
 | |
| 				gsw_port2: port@2 {
 | |
| 					reg = <2>;
 | |
| 					label = "lan2";
 | |
| 					phy-mode = "internal";
 | |
| 					phy-handle = <&gsw_phy2>;
 | |
| 				};
 | |
| 
 | |
| 				gsw_port3: port@3 {
 | |
| 					reg = <3>;
 | |
| 					label = "lan3";
 | |
| 					phy-mode = "internal";
 | |
| 					phy-handle = <&gsw_phy3>;
 | |
| 				};
 | |
| 
 | |
| 				gsw_port4: port@4 {
 | |
| 					reg = <4>;
 | |
| 					label = "lan4";
 | |
| 					phy-mode = "internal";
 | |
| 					phy-handle = <&gsw_phy4>;
 | |
| 				};
 | |
| 
 | |
| 				port@6 {
 | |
| 					reg = <6>;
 | |
| 					label = "cpu";
 | |
| 					ethernet = <&gdm1>;
 | |
| 					phy-mode = "internal";
 | |
| 
 | |
| 					fixed-link {
 | |
| 						speed = <10000>;
 | |
| 						full-duplex;
 | |
| 						pause;
 | |
| 					};
 | |
| 				};
 | |
| 			};
 | |
| 
 | |
| 			mdio: mdio {
 | |
| 				#address-cells = <1>;
 | |
| 				#size-cells = <0>;
 | |
| 
 | |
| 				gsw_phy1: ethernet-phy@1 {
 | |
| 					compatible = "ethernet-phy-ieee802.3-c22";
 | |
| 					reg = <9>;
 | |
| 					phy-mode = "internal";
 | |
| 
 | |
| 					leds {
 | |
| 						#address-cells = <1>;
 | |
| 						#size-cells = <0>;
 | |
| 
 | |
| 						gsw_phy1_led0: gsw-phy1-led0@0 {
 | |
| 							reg = <0>;
 | |
| 							function = "phy1_led0";
 | |
| 							status = "disabled";
 | |
| 						};
 | |
| 
 | |
| 						gsw_phy1_led1: gsw-phy1-led1@1 {
 | |
| 							reg = <1>;
 | |
| 							function = "phy1_led1";
 | |
| 							status = "disabled";
 | |
| 						};
 | |
| 					};
 | |
| 				};
 | |
| 
 | |
| 				gsw_phy2: ethernet-phy@2 {
 | |
| 					compatible = "ethernet-phy-ieee802.3-c22";
 | |
| 					reg = <10>;
 | |
| 					phy-mode = "internal";
 | |
| 
 | |
| 					leds {
 | |
| 						#address-cells = <1>;
 | |
| 						#size-cells = <0>;
 | |
| 
 | |
| 						gsw_phy2_led0: gsw-phy2-led0@0 {
 | |
| 							reg = <0>;
 | |
| 							function = "phy2_led0";
 | |
| 							status = "disabled";
 | |
| 						};
 | |
| 
 | |
| 						gsw_phy2_led1: gsw-phy2-led1@1 {
 | |
| 							reg = <1>;
 | |
| 							function = "phy1_led1";
 | |
| 							status = "disabled";
 | |
| 						};
 | |
| 					};
 | |
| 				};
 | |
| 
 | |
| 				gsw_phy3: ethernet-phy@3 {
 | |
| 					compatible = "ethernet-phy-ieee802.3-c22";
 | |
| 					reg = <11>;
 | |
| 					phy-mode = "internal";
 | |
| 
 | |
| 					leds {
 | |
| 						#address-cells = <1>;
 | |
| 						#size-cells = <0>;
 | |
| 
 | |
| 						gsw_phy3_led0: gsw-phy3-led0@0 {
 | |
| 							reg = <0>;
 | |
| 							function = LED_FUNCTION_LAN;
 | |
| 							status = "disabled";
 | |
| 						};
 | |
| 
 | |
| 						gsw_phy3_led1: gsw-phy3-led1@1 {
 | |
| 							reg = <1>;
 | |
| 							function = LED_FUNCTION_LAN;
 | |
| 							status = "disabled";
 | |
| 						};
 | |
| 					};
 | |
| 				};
 | |
| 
 | |
| 				gsw_phy4: ethernet-phy@4 {
 | |
| 					compatible = "ethernet-phy-ieee802.3-c22";
 | |
| 					reg = <12>;
 | |
| 					phy-mode = "internal";
 | |
| 
 | |
| 					leds {
 | |
| 						#address-cells = <1>;
 | |
| 						#size-cells = <0>;
 | |
| 
 | |
| 						gsw_phy4_led0: gsw-phy4-led0@0 {
 | |
| 							reg = <0>;
 | |
| 							function = LED_FUNCTION_LAN;
 | |
| 							status = "disabled";
 | |
| 						};
 | |
| 
 | |
| 						gsw_phy4_led1: gsw-phy4-led1@1 {
 | |
| 							reg = <1>;
 | |
| 							function = LED_FUNCTION_LAN;
 | |
| 							status = "disabled";
 | |
| 						};
 | |
| 					};
 | |
| 				};
 | |
| 			};
 | |
| 		};
 | |
| 	};
 | |
| };
 |