mirror of
https://gitee.com/open-loongarch/linux-5.10.git
synced 2026-10-25 20:57:11 +08:00
lscanfd.ko is in driver/net/can/ls_can. usage: insmod lscanfd.ko insmod lscanfd_platform.ko
988 lines
24 KiB
Devicetree
988 lines
24 KiB
Devicetree
/dts-v1/;
|
||
/ {
|
||
model = "loongson,generic";
|
||
compatible = "loongson,loongson3";
|
||
#address-cells = <2>;
|
||
#size-cells = <2>;
|
||
|
||
aliases {
|
||
ethernet0 = &gmac0;
|
||
ethernet1 = &gmac1;
|
||
serial0 = &uart0;
|
||
serial1 = &uart1;
|
||
serial2 = &uart2;
|
||
serial3 = &uart3;
|
||
serial4 = &uart4;
|
||
serial5 = &uart5;
|
||
serial6 = &uart6;
|
||
serial7 = &uart7;
|
||
spi0 = &spi0;
|
||
spi1 = &spi1;
|
||
i2c0 = &i2c0;
|
||
i2c1 = &i2c1;
|
||
i2c2 = &i2c2;
|
||
i2c3 = &i2c3;
|
||
mmc0 = &emmc0;
|
||
mmc1 = &sdio1;
|
||
};
|
||
|
||
// memory {
|
||
// name = "memory";
|
||
// device_type = "memory";
|
||
// reg = <0 0x00200000 0 0x0ee00000
|
||
// 0 0x90000000 0 0x30000000>;
|
||
// };
|
||
|
||
// reserved-memory {
|
||
// #address-cells = <2>;
|
||
// #size-cells = <2>;
|
||
// ranges;
|
||
|
||
// linux,cma {
|
||
// compatible = "shared-dma-pool";
|
||
// reusable;
|
||
// size = <0x2000000>;
|
||
// linux,cma-default;
|
||
// };
|
||
// };
|
||
|
||
cpus {
|
||
#address-cells = <1>;
|
||
#size-cells = <0>;
|
||
cpu-map {
|
||
cluster0 {
|
||
core0 {
|
||
cpu = <&cpu0>;
|
||
};
|
||
};
|
||
};
|
||
|
||
|
||
cpu0: cpu@10000 {
|
||
device_type = "cpu";
|
||
compatible = "loongarch";
|
||
reg=<0>;
|
||
numa-node-id = <0>;
|
||
};
|
||
|
||
};
|
||
|
||
cpuic: interrupt-controller {
|
||
compatible = "loongson,cpu-interrupt-controller";
|
||
interrupt-controller;
|
||
#interrupt-cells = <1>;
|
||
};
|
||
|
||
icu: interrupt-controller@14001400 {
|
||
compatible = "loongson,2k500-icu";
|
||
interrupt-controller;
|
||
#interrupt-cells = <1>;
|
||
reg = <0 0x14001400 0 0x40
|
||
0 0x14001040 0 16>;
|
||
interrupt-parent = <&cpuic>;
|
||
interrupt-names = "cascade";
|
||
interrupts = <4>;
|
||
};
|
||
|
||
extioiic: interrupt-controller@0x14001600 {
|
||
compatible = "loongson,extioi-interrupt-controller";
|
||
interrupt-controller;
|
||
#interrupt-cells = <1>;
|
||
interrupt-parent = <&cpuic>;
|
||
interrupts = <3>;
|
||
interrupt-names = "cascade";
|
||
vec_count=<128>;
|
||
misc_func=<0x100>;
|
||
eio_en_off=<15>;
|
||
};
|
||
|
||
// uart0 uart1 分线复用
|
||
pinmux_uart: pinmux@14000100 {
|
||
compatible = "pinctrl-single";
|
||
reg = <0x80000000 0x14000100 0 0x8>;
|
||
#address-cells = <1>;
|
||
#size-cells = <0>;
|
||
#pinctrl-cells = <2>;
|
||
pinctrl-single,bit-per-mux;
|
||
pinctrl-single,register-width = <32>;
|
||
pinctrl-single,function-mask = <0x3>;
|
||
|
||
// uart 0 1 2 复用 uart0,uart 3 复用 uart1
|
||
uart3_on_uart1:uart3_on_uart1 {
|
||
pinctrl-single,bits = <0x0 0x60000000 0xf0000000
|
||
0x4 0x00000008 0x000000f>;
|
||
};
|
||
|
||
// uart 0 1 2 3复用 uart0
|
||
uart0_8wires:uart0_8wires {
|
||
pinctrl-single,bits = <0x0 0xe0000000 0xf0000000>;
|
||
};
|
||
};
|
||
|
||
pinmux_main: pinmux@14000490 {
|
||
compatible = "pinctrl-single";
|
||
reg = <0x80000000 0x14000490 0 0x30>;
|
||
#address-cells = <1>;
|
||
#size-cells = <0>;
|
||
#pinctrl-cells = <2>;
|
||
pinctrl-single,bit-per-mux;
|
||
pinctrl-single,register-width = <32>;
|
||
pinctrl-single,function-mask = <0x3>;
|
||
//uart0 gpio0~1 3
|
||
uart0_pins: pinmux_uart0_pins {
|
||
pinctrl-single,bits = <0x0 0x0000000f 0x0000000f>;
|
||
};
|
||
//uart1 gpio2~3 3
|
||
uart1_pins: pinmux_uart1_pins {
|
||
pinctrl-single,bits = <0x0 0x000000f0 0x000000f0>;
|
||
};
|
||
// gpio12~13 1
|
||
uart2_pins: pinmux_uart2_pins {
|
||
pinctrl-single,bits = <0x0 0x05000000 0x0f000000>;
|
||
};
|
||
// gpio14~15 1
|
||
uart3_pins: pinmux_uart3_pins {
|
||
pinctrl-single,bits = <0x0 0x50000000 0xf0000000>;
|
||
};
|
||
|
||
//spi0 gpio8~11 3
|
||
spi0_pins: pinmux_spi0_pins {
|
||
pinctrl-single,bits = <0x0 0x00ff0000 0x00ff0000>;
|
||
};
|
||
|
||
//spi1 gpio12~15 3
|
||
//和uart2, 3 冲突
|
||
spi1_pins: pinmux_spi1_pins {
|
||
pinctrl-single,bits = <0x0 0xff000000 0xff000000>;
|
||
};
|
||
|
||
g12_15_as_gpio: pinmux_g12_15_as_gpio {
|
||
pinctrl-single,bits = <0x0 0x00000000 0xff000000>;
|
||
};
|
||
|
||
//sdio0 gpio4~7 2
|
||
// gpio16~21 3
|
||
sdio0_pins: pinmux_i2c0_pins {
|
||
pinctrl-single,bits = <0x0 0x0000aa00 0x0000ff00
|
||
0x4 0x00000fff 0x00000fff>;
|
||
};
|
||
|
||
//sdio1 gpio22~27 3
|
||
sdio1_pins: pinmux_sdio1_pins {
|
||
pinctrl-single,bits = <0x4 0x00fff000 0x00fff000>;
|
||
};
|
||
|
||
//pwm0~4 gpio28~31 1
|
||
pwm0_pins: pinmux_pwm0_pins {
|
||
pinctrl-single,bits = <0x4 0x01000000 0x03000000>;
|
||
};
|
||
|
||
pwm1_pins: pinmux_pwm1_pins {
|
||
pinctrl-single,bits = <0x4 0x04000000 0x0c000000>;
|
||
};
|
||
|
||
pwm2_pins: pinmux_pwm2_pins {
|
||
pinctrl-single,bits = <0x4 0x10000000 0x30000000>;
|
||
};
|
||
|
||
pwm3_pins: pinmux_pwm3_pins {
|
||
pinctrl-single,bits = <0x4 0x40000000 0xc0000000>;
|
||
};
|
||
|
||
// gpio32~43 2
|
||
gmac1_pins: pinmux_gmac1_pins {
|
||
pinctrl-single,bits = <0x8 0x00aaaaaa 0x00ffffff>;
|
||
};
|
||
};
|
||
|
||
pinmux_prt: pinmux@15103040 {
|
||
compatible = "pinctrl-single";
|
||
reg = <0x80000000 0x15103040 0 0x40>;
|
||
#address-cells = <1>;
|
||
#size-cells = <0>;
|
||
#pinctrl-cells = <2>;
|
||
pinctrl-single,bit-per-mux;
|
||
pinctrl-single,register-width = <32>;
|
||
pinctrl-single,function-mask = <0x3>;
|
||
|
||
//uart gpio0~1 3
|
||
prt_uart0_pins: pinmux_prt_uart0_pins {
|
||
pinctrl-single,bits = <0x0 0x0000000f 0x0000000f>;
|
||
};
|
||
|
||
//uart gpio4~5 2
|
||
prt_uart1_pins: pinmux_prt_uart1_pins {
|
||
pinctrl-single,bits = <0x0 0x00000a00 0x00000f00>;
|
||
};
|
||
|
||
//i2c0 gpio2~3 3
|
||
prt_i2c0_pins:pinmux_prt_i2c0_pins {
|
||
pinctrl-single,bits = <0x0 0x000000f0 0x000000f0>;
|
||
};
|
||
|
||
//i2c1 gpio4~5 3
|
||
//和 uart1 冲突
|
||
prt_i2c1_pins:pinmux_prt_i2c1_pins {
|
||
pinctrl-single,bits = <0x0 0x00000f00 0x00000f00>;
|
||
};
|
||
|
||
//spi gpio6~9 3
|
||
prt_spi0_pins:pinmux_prt_spi0_pins {
|
||
pinctrl-single,bits = <0x0 0x000ff000 0x000ff000>;
|
||
};
|
||
prt_spi0_as_gpio:pinmux_prt_spi0_as_gpio {
|
||
pinctrl-single,bits = <0x0 0x00000000 0x000ff000>;
|
||
};
|
||
|
||
// pwm0~pwm15 gpio 18-33 2
|
||
prt_pwm0_pins:pinmux_prt_pwm0_pins {
|
||
pinctrl-single,bits = <0x4 0x00000020 0x0000030>;
|
||
};
|
||
prt_pwm1_pins:pinmux_prt_pwm1_pins {
|
||
pinctrl-single,bits = <0x4 0x00000080 0x00000c0>;
|
||
};
|
||
prt_pwm2_pins:pinmux_prt_pwm2_pins {
|
||
pinctrl-single,bits = <0x4 0x00000200 0x0000300>;
|
||
};
|
||
prt_pwm3_pins:pinmux_prt_pwm3_pins {
|
||
pinctrl-single,bits = <0x4 0x00000800 0x0000c00>;
|
||
};
|
||
prt_pwm4_pins:pinmux_prt_pwm4_pins {
|
||
pinctrl-single,bits = <0x4 0x00002000 0x0003000>;
|
||
};
|
||
prt_pwm5_pins:pinmux_prt_pwm5_pins {
|
||
pinctrl-single,bits = <0x4 0x00008000 0x0000c000>;
|
||
};
|
||
prt_pwm6_pins:pinmux_prt_pwm6_pins {
|
||
pinctrl-single,bits = <0x4 0x00020000 0x00030000>;
|
||
};
|
||
prt_pwm7_pins:pinmux_prt_pwm7_pins {
|
||
pinctrl-single,bits = <0x4 0x00080000 0x000c0000>;
|
||
};
|
||
prt_pwm8_pins:pinmux_prt_pwm8_pins {
|
||
pinctrl-single,bits = <0x4 0x00200000 0x00300000>;
|
||
};
|
||
prt_pwm9_pins:pinmux_prt_pwm9_pins {
|
||
pinctrl-single,bits = <0x4 0x00800000 0x00c00000>;
|
||
};
|
||
prt_pwm10_pins:pinmux_prt_pwm10_pins {
|
||
pinctrl-single,bits = <0x4 0x02000000 0x03000000>;
|
||
};
|
||
prt_pwm11_pins:pinmux_prt_pwm11_pins {
|
||
pinctrl-single,bits = <0x4 0x08000000 0x0c000000>;
|
||
};
|
||
prt_pwm12_pins:pinmux_prt_pwm12_pins {
|
||
pinctrl-single,bits = <0x4 0x20000000 0x30000000>;
|
||
};
|
||
prt_pwm13_pins:pinmux_prt_pwm13_pins {
|
||
pinctrl-single,bits = <0x4 0x80000000 0xc0000000>;
|
||
};
|
||
prt_pwm14_pins:pinmux_prt_pwm14_pins {
|
||
pinctrl-single,bits = <0x8 0x00000020 0x0000030>;
|
||
};
|
||
prt_pwm15_pins:pinmux_prt_pwm15_pins {
|
||
pinctrl-single,bits = <0x8 0x00000080 0x00000c0>;
|
||
};
|
||
|
||
};
|
||
|
||
pinmux_sca: pinmux@15202040 {
|
||
compatible = "pinctrl-single";
|
||
reg = <0x80000000 0x15202040 0 0x30>;
|
||
#address-cells = <1>;
|
||
#size-cells = <0>;
|
||
#pinctrl-cells = <2>;
|
||
pinctrl-single,bit-per-mux;
|
||
pinctrl-single,register-width = <32>;
|
||
pinctrl-single,function-mask = <0x3>;
|
||
|
||
//uart gpio0~1 3
|
||
sca_uart0_pins: pinmux_sca_uart0_pins {
|
||
pinctrl-single,bits = <0x0 0x0000000f 0x0000000f>;
|
||
};
|
||
//uart gpio3~4 1
|
||
sca_uart1_pins: pinmux_sca_uart1_pins {
|
||
pinctrl-single,bits = <0x0 0x00000140 0x000003c0>;
|
||
};
|
||
|
||
//spi0 gpio2~5 3
|
||
//和uart1 冲突
|
||
sca_spi0_pins: pinmux_sca_spi0_pins {
|
||
pinctrl-single,bits = <0x0 0x00000ff0 0x00000ff0>;
|
||
};
|
||
sca_spi0_as_gpio: pinmux_sca_spi0_as_gpio {
|
||
pinctrl-single,bits = <0x0 0x00000000 0x00000ff0>;
|
||
};
|
||
|
||
//gpio6 0
|
||
};
|
||
|
||
|
||
soc {
|
||
compatible = "ls,nbus", "simple-bus";
|
||
#address-cells = <2>;
|
||
#size-cells = <2>;
|
||
ranges = <0 0x10000000 0 0x10000000 0 0x10000000
|
||
0 0x2000000 0 0x2000000 0 0x2000000
|
||
0 0x20000000 0 0x20000000 0 0x10000000
|
||
0 0x40000000 0 0x40000000 0 0x40000000
|
||
0xfe 0x00000000 0xfe 0x00000000 0 0x40000000>;
|
||
|
||
isa@16400000 {
|
||
compatible = "isa";
|
||
#size-cells = <1>;
|
||
#address-cells = <2>;
|
||
ranges = <1 0 0 0x16400000 0x4000>;
|
||
};
|
||
|
||
wdt: syscon@14205000 {
|
||
compatible = "syscon";
|
||
reg = <0x0 0x14205000 0x0 0x10>;
|
||
};
|
||
|
||
dmp: syscon@15104000 {
|
||
compatible = "syscon";
|
||
reg = <0x0 0x15104000 0x0 0x1000>;
|
||
};
|
||
|
||
reboot {
|
||
compatible ="syscon-reboot";
|
||
regmap = <&wdt>;
|
||
offset = <0x0>;
|
||
mask = <0x1>;
|
||
};
|
||
|
||
poweroff {
|
||
compatible ="syscon-poweroff";
|
||
regmap = <&dmp>;
|
||
offset = <0x8>;
|
||
mask = <0xfff>;
|
||
value = <0xfff>;
|
||
};
|
||
|
||
uart0: serial@0x14200000 {
|
||
compatible = "ns16550a";
|
||
reg = <0 0x14200000 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
//interrupt-parent = <&extioiic>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <0>;
|
||
no-loopback-test;
|
||
};
|
||
|
||
uart1: serial@0x14200400 {
|
||
compatible = "ns16550a";
|
||
reg = <0 0x14200400 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
//interrupt-parent = <&extioiic>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <1>;
|
||
no-loopback-test;
|
||
pinctrl-names = "default";
|
||
pinctrl-0 = <&uart1_pins>;
|
||
status = "disabled";
|
||
};
|
||
|
||
uart2: serial@0x14200800 {
|
||
compatible = "ns16550a";
|
||
reg = <0 0x14200800 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
//interrupt-parent = <&extioiic>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <2>;
|
||
no-loopback-test;
|
||
pinctrl-names = "default";
|
||
pinctrl-0 = <&uart2_pins>;
|
||
status = "disabled";
|
||
};
|
||
|
||
uart3: serial@0x14200c00 {
|
||
compatible = "ns16550a";
|
||
reg = <0 0x14200c00 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
//interrupt-parent = <&extioiic>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <3>;
|
||
no-loopback-test;
|
||
pinctrl-names = "default";
|
||
pinctrl-0 = <&uart3_pins>;
|
||
status = "disabled";
|
||
};
|
||
|
||
uart4: serial@0x15100000 {
|
||
compatible = "ns16550a";
|
||
reg = <0 0x15100000 0 0x10>;
|
||
clock-frequency = <100000000>;
|
||
//interrupt-parent = <&extioiic>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <39>;
|
||
no-loopback-test;
|
||
pinctrl-names = "default";
|
||
pinctrl-0 = <&prt_uart0_pins>;
|
||
status = "disabled";
|
||
};
|
||
|
||
uart5: serial@0x15100800 {
|
||
compatible = "ns16550a";
|
||
reg = <0 0x15100800 0 0x10>;
|
||
clock-frequency = <100000000>;
|
||
//interrupt-parent = <&extioiic>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <39>;
|
||
no-loopback-test;
|
||
pinctrl-names = "default";
|
||
pinctrl-0 = <&prt_uart1_pins>;
|
||
status = "disabled";
|
||
};
|
||
|
||
uart6: serial@0x15200000 {
|
||
compatible = "ns16550a";
|
||
reg = <0 0x15200000 0 0x10>;
|
||
clock-frequency = <100000000>;
|
||
//interrupt-parent = <&extioiic>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <53>;
|
||
no-loopback-test;
|
||
pinctrl-names = "default";
|
||
pinctrl-0 = <&sca_uart0_pins>;
|
||
status = "disabled";
|
||
};
|
||
|
||
uart7: serial@0x15200800 {
|
||
compatible = "ns16550a";
|
||
reg = <0 0x15200800 0 0x10>;
|
||
clock-frequency = <100000000>;
|
||
//interrupt-parent = <&extioiic>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <54>;
|
||
no-loopback-test;
|
||
pinctrl-names = "default";
|
||
pinctrl-0 = <&sca_uart1_pins>;
|
||
status = "disabled";
|
||
};
|
||
|
||
// EMMC 与 SDIO 必须同时使用扩展中断,
|
||
// 如果只有SDIO使用扩展中断,则中断不会响应
|
||
// 表现为系统卡死
|
||
/*emmc*/
|
||
emmc0: mmc0@0x14210000 {
|
||
#address-cells = <2>;
|
||
compatible = "loongson,ls2k_sdio_1.1";
|
||
reg = <0 0x14210000 0 0x1000>;
|
||
//interrupt-parent = <&icu>;
|
||
//interrupts = <13>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <8>;
|
||
interrupt-names = "ls2k_mci_irq";
|
||
dma-mask = <0xffffffff 0xffffffff>;
|
||
clock-frequency = <0 200000000>;
|
||
bus-width = <8>;
|
||
cap-mmc-highspeed;
|
||
no-sd;
|
||
no-sdio;
|
||
pinctrl-0 = <&sdio0_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disabled";
|
||
};
|
||
|
||
sdio1: mmc1@0x14218000 {
|
||
#address-cells = <2>;
|
||
compatible = "loongson,ls2k_sdio_1.2";
|
||
reg = <0 0x14218000 0 0x1000>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <13>;
|
||
//interrupt-parent = <&extioiic>;
|
||
//interrupts = <10>;
|
||
interrupt-names = "ls2k_sdio_irq";
|
||
clock-frequency = <0 200000000>;
|
||
dma-mask = <0xffffffff 0xffffffff>;
|
||
bus-width = <4>;
|
||
cap-sd-highspeed;
|
||
cap-mmc-highspeed;
|
||
//no-mmc;
|
||
status = "disabled";
|
||
};
|
||
|
||
gmac0: ethernet@0x14140000 {
|
||
compatible = "snps,dwmac-3.70a";
|
||
reg = <0 0x14140000 0 0x10000>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <18>;
|
||
//interrupt-parent = <&extioiic>;
|
||
//interrupts = <40>;
|
||
interrupt-names = "macirq";
|
||
// mac-address = [ 64 48 48 48 48 60 ];/* [>mac 64:48:48:48:48:60 <]*/
|
||
phy-mode = "rgmii";
|
||
bus_id = <0x0>;
|
||
phy_addr = <0xffffffff>;
|
||
dma-mask = <0xffffffff 0xffffffff>;
|
||
status = "disabled";
|
||
};
|
||
|
||
gmac1: ethernet@0x14020000 {
|
||
compatible = "snps,dwmac-3.70a";
|
||
reg = <0 0x14020000 0 0x10000>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <22>;
|
||
//interrupt-parent = <&extioiic>;
|
||
//interrupts = <60>;
|
||
interrupt-names = "macirq";
|
||
// mac-address = [ 64 48 48 48 48 61 ];/* [>mac 64:48:48:48:48:61 <]*/
|
||
phy-mode = "rgmii";
|
||
bus_id = <0x1>;
|
||
phy_addr = <0xffffffff>;
|
||
dma-mask = <0xffffffff 0xffffffff>;
|
||
pinctrl-0 = <&gmac1_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disabled";
|
||
};
|
||
|
||
otg: otg@0x14100000 {
|
||
//compatible = "loongson,dwc-otg","dwc-otg","loongson,dwc2";
|
||
compatible = "loongson,loongson2-dwc2";
|
||
reg = <0 0x14100000 0 0x40000>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <17>;
|
||
//interrupt-parent = <&extioiic>;
|
||
//interrupts = <39>;
|
||
dma-mask = <0x0 0xffffffff>;
|
||
};
|
||
|
||
ehci@0x14030000 {
|
||
compatible = "loongson,ls2k-ehci", "generic-ehci";
|
||
reg = <0 0x14030000 0 0x8000>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <20>;
|
||
//interrupt-parent = <&extioiic>;
|
||
//interrupts = <58>;
|
||
dma-mask = <0xffffffff 0xffffffff>;
|
||
};
|
||
|
||
ohci@0x14038000 {
|
||
compatible = "loongson,ls2k-ohci", "generic-ohci";
|
||
reg = <0 0x14038000 0 0x8000>;
|
||
interrupt-parent = <&icu>;
|
||
interrupts = <21>;
|
||
//interrupt-parent = <&extioiic>;
|
||
//interrupts = <59>;
|
||
dma-mask = <0x0 0xffffffff>;
|
||
};
|
||
|
||
spi0: spi@0x14010000 {
|
||
compatible = "loongson,ls-spi";
|
||
reg = <0 0x14010000 0 0x40000>;
|
||
#address-cells = <1>;
|
||
#size-cells = <0>;
|
||
pinctrl-0 = <&spi0_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disabled";
|
||
};
|
||
|
||
spi1: spi@0x14203000 {
|
||
compatible = "loongson,ls-spi-io";
|
||
reg = <0 0x14203000 0 0x2000>;
|
||
clock-frequency = <200000000>;
|
||
#address-cells = <1>;
|
||
#size-cells = <0>;
|
||
pinctrl-0 = <&spi1_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disabled";
|
||
};
|
||
|
||
// PRT-SPI
|
||
spi2: spi@0x15109000 {
|
||
compatible = "loongson,ls-spi-io";
|
||
reg = <0 0x15109000 0 0x2000>;
|
||
clock-frequency = <200000000>;
|
||
#address-cells = <1>;
|
||
#size-cells = <0>;
|
||
pinctrl-0 = <&prt_spi0_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disabled";
|
||
};
|
||
|
||
// SCA-SPI
|
||
spi3: spi@0x15203000 {
|
||
compatible = "loongson,ls-spi-io";
|
||
reg = <0 0x15203000 0 0x2000>;
|
||
clock-frequency = <200000000>;
|
||
#address-cells = <1>;
|
||
#size-cells = <0>;
|
||
pinctrl-0 = <&sca_spi0_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disabled";
|
||
};
|
||
|
||
i2c0: i2c@0x14201000 {
|
||
compatible = "loongson,ls2k-i2c";
|
||
reg = <0 0x14201000 0 0x0800>;
|
||
#address-cells = <1>;
|
||
#size-cells = <0>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <4>;
|
||
status = "disabled";
|
||
};
|
||
|
||
i2c1: i2c@0x14202800 {
|
||
compatible = "loongson,ls2k-i2c";
|
||
reg = <0 0x14202800 0 0x0800>;
|
||
#address-cells = <1>;
|
||
#size-cells = <0>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <5>;
|
||
status = "disabled";
|
||
};
|
||
|
||
i2c2: prt_i2c@0x15101000 {
|
||
compatible = "loongson,ls2k-i2c";
|
||
reg = <0 0x15101000 0 0x0800>;
|
||
#address-cells = <1>;
|
||
#size-cells = <0>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <89>;
|
||
pinctrl-0 = <&prt_i2c0_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disabled";
|
||
};
|
||
|
||
i2c3: prt_i2c@0x15101800 {
|
||
compatible = "loongson,ls2k-i2c";
|
||
reg = <0 0x15101800 0 0x0800>;
|
||
#address-cells = <1>;
|
||
#size-cells = <0>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <90>;
|
||
pinctrl-0 = <&prt_i2c1_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disabled";
|
||
};
|
||
|
||
// main gpio 0~43 -> 0~43
|
||
pioA:main_gpio@0x14202000 {
|
||
compatible = "loongson,ls2p-gpio";
|
||
reg = <0 0x14202000 0 0x1000>;
|
||
ngpios = <44>;
|
||
gpio_base = <0>;
|
||
gpio-controller;
|
||
#gpio-cells = <2>;
|
||
loongson,vhwirq-base = <128>;
|
||
interrupt-controller;
|
||
#interrupt-cells = <2>;
|
||
interrupt-parent =<&extioiic>;
|
||
interrupts =
|
||
<41>, <42>, <43>, <44>,
|
||
<45>, <46>, <47>, <48>,
|
||
<49>, <50>, <51>, <52>,
|
||
<53>, <54>, <55>, <56>;
|
||
/*
|
||
* 只引出了 44 个GPIO,但寄存器支持 64 个GPIO
|
||
*/
|
||
loongson,irqpin-group =
|
||
<0 4>, <4 4>, <8 4>, <12 4>,
|
||
<16 4>, <20 4>, <24 4>, <28 4>,
|
||
<32 4>, <36 5>, <40 4>, <44 4>,
|
||
<48 4>, <52 4>, <56 4>, <60 4>;
|
||
};
|
||
|
||
// prt gpio 0~57 -> 44~101
|
||
pioB:prt_gpio@0x15102000 {
|
||
compatible = "loongson,ls2p-gpio";
|
||
reg = <0 0x15102000 0 0x1000>;
|
||
ngpios = <58>;
|
||
gpio_base = <44>;
|
||
gpio-controller;
|
||
#gpio-cells = <2>;
|
||
loongson,vhwirq-base = <192>;
|
||
interrupt-controller;
|
||
#interrupt-cells = <2>;
|
||
interrupt-parent =<&extioiic>;
|
||
interrupts = <104>,<105>,<106>;
|
||
/*
|
||
* 只引出了 58 个GPIO,但寄存器支持 72 个GPIO
|
||
*/
|
||
loongson,irqpin-group = <0 24>, <24 24>, <48 24>;
|
||
};
|
||
|
||
// sca gpio 0~36 -> 102~138
|
||
pioC:sca_gpio@0x15201000 {
|
||
compatible = "loongson,ls2p-gpio";
|
||
reg = <0 0x15201000 0 0x1000>;
|
||
ngpios = <37>;
|
||
gpio_base = <102>;
|
||
gpio-controller;
|
||
#gpio-cells = <2>;
|
||
loongson,vhwirq-base = <264>;
|
||
interrupt-controller;
|
||
#interrupt-cells = <2>;
|
||
interrupt-parent =<&extioiic>;
|
||
interrupts = <120>, <121>, <122>, <123>, <124>;
|
||
/*
|
||
* 只引出了 37 个GPIO,但寄存器支持 40 个GPIO
|
||
*/
|
||
loongson,irqpin-group = <0 8>, <8 8>, <16 8>, <24 8>, <32 8>;
|
||
};
|
||
|
||
rtc0: rtc@1510a000{
|
||
compatible = "loongson,ls2k-rtc";
|
||
reg = <0 0x1510a000 0 0x100>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <98>;
|
||
status = "disabled";
|
||
};
|
||
|
||
tsensor: tsensor@14001500 {
|
||
compatible = "loongson,ls2k-tsensor";
|
||
reg = <0 0x14001500 0 0x30>;
|
||
id = <0>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <63>;
|
||
#thermal-sensor-cells = <1>;
|
||
};
|
||
|
||
thermal-zones {
|
||
cpu_thermal: cpu-thermal {
|
||
polling-delay-passive = <1000>;
|
||
polling-delay = <5000>;
|
||
thermal-sensors = <&tsensor 0>;
|
||
|
||
trips {
|
||
cpu_alert: cpu-alert {
|
||
temperature = <55000>;
|
||
hysteresis = <5000>;
|
||
type = "active";
|
||
};
|
||
|
||
cpu_crit: cpu-crit {
|
||
temperature = <125000>;
|
||
hysteresis = <5000>;
|
||
type = "critical";
|
||
};
|
||
};
|
||
};
|
||
};
|
||
|
||
|
||
/*main pwm0~15 14207000*/
|
||
pwm0: pwm@14207000{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x14207000 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <19>;
|
||
pinctrl-0 = <&pwm0_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
pwm1: pwm@14207010{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x14207010 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <20>;
|
||
pinctrl-0 = <&pwm1_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
pwm2: pwm@14207020{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x14207020 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <21>;
|
||
pinctrl-0 = <&pwm2_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
pwm3: pwm@14207030{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x14207030 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <22>;
|
||
pinctrl-0 = <&pwm3_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
/*main pwm0~23 15107000*/
|
||
prt_pwm0: pwm@15107000{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x15107000 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <83>;
|
||
pinctrl-0 = <&prt_pwm0_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm1: pwm@15107010{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x15107010 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <83>;
|
||
pinctrl-0 = <&prt_pwm1_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm2: pwm@15107020{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x15107020 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <83>;
|
||
pinctrl-0 = <&prt_pwm2_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm3: pwm@15107030{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x15107030 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <83>;
|
||
pinctrl-0 = <&prt_pwm3_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm4: pwm@15107040{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x15107040 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <83>;
|
||
pinctrl-0 = <&prt_pwm4_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm5: pwm@15107050{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x15107050 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <83>;
|
||
pinctrl-0 = <&prt_pwm5_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm6: pwm@15107060{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x15107060 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <83>;
|
||
pinctrl-0 = <&prt_pwm6_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm7: pwm@15107070{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x15107070 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <83>;
|
||
pinctrl-0 = <&prt_pwm7_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm8: pwm@15107080{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x15107080 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <84>;
|
||
pinctrl-0 = <&prt_pwm8_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm9: pwm@15107090{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x15107090 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <84>;
|
||
pinctrl-0 = <&prt_pwm9_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm10: pwm@151070a0{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x151070a0 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <84>;
|
||
pinctrl-0 = <&prt_pwm10_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm11: pwm@151070b0{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x151070b0 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <84>;
|
||
pinctrl-0 = <&prt_pwm11_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm12: pwm@151070c0{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x151070c0 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <84>;
|
||
pinctrl-0 = <&prt_pwm12_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm13: pwm@151070d0{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x151070d0 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <84>;
|
||
pinctrl-0 = <&prt_pwm13_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm14: pwm@151070e0{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x151070e0 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <84>;
|
||
pinctrl-0 = <&prt_pwm14_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
|
||
prt_pwm15: pwm@151070f0{
|
||
compatible = "loongson,ls2k-pwm";
|
||
reg = <0 0x151070f0 0 0x10>;
|
||
clock-frequency = <200000000>;
|
||
interrupt-parent = <&extioiic>;
|
||
interrupts = <84>;
|
||
pinctrl-0 = <&prt_pwm15_pins>;
|
||
pinctrl-names = "default";
|
||
status = "disable"
|
||
};
|
||
};
|
||
};
|