Add lscanfd.ko (6965e5fa1627)

lscanfd.ko is in driver/net/can/ls_can.

usage:
insmod lscanfd.ko
insmod lscanfd_platform.ko
This commit is contained in:
tao89959
2024-08-12 20:22:20 +08:00
committed by loongson
parent 79c4598505
commit b212174b4f
18 changed files with 264 additions and 37 deletions
@@ -25,6 +25,8 @@
spi1 = &spi1;
spi2 = &spi2;
spi3 = &spi3;
ethernet0 = &gmac0;
ethernet1 = &gmac1;
};
cpus {
@@ -123,6 +125,10 @@
pinctrl-single,bits = <0x10 0x000000a0 0xf00000f0>;
};
gmac1_pins: pinmux_G44_G55_as_gmac1 {
pinctrl-single,bits = <0x8 0x55000000 0xff000000
0xc 0x00005555 0x0000ffff>;
};
i2c0_pins: pinmux_G48_G49_as_i2c0 {
pinctrl-single,bits = <0xc 0x0000000f 0x0000000f>;
};
@@ -151,6 +157,10 @@
pinctrl-single,bits = <0x10 0x000000ff 0x000000ff>;
};
spi2_cs_as_gpio: pinmux_G64_G66_as_spi2 {
pinctrl-single,bits = <0x10 0x0000003f 0x000000ff>;
};
can0_pins: pinmux_G68_G69_as_can0 {
pinctrl-single,bits = <0x10 0x00000f00 0x00000f00>;
};
@@ -436,8 +446,8 @@
interrupt-names = "macirq";
dma-mask = <0xffffffff 0xffffffff>;
phy-mode = "rgmii";
// pinctrl-0 = <&gmac1_pins>;
// pinctrl-names = "default";
pinctrl-0 = <&gmac1_pins>;
pinctrl-names = "default";
snps,pbl = <32>;
status = "disabled";
};
@@ -483,46 +493,58 @@
};
can0: can@0x16110000 {
compatible = "ls,lscanfd";
compatible = "loongson,ls-canfd";
reg = <0 0x16110000 0 0x400>;
ls,clock-frequency = <200000000>;
ls,canfd-dmarx;
interrupt-parent = <&icu>;
interrupts = <8>;
pinctrl-0 = <&can0_pins>;
pinctrl-names = "default";
dmas = <&dma 0 0xaae>;
dma-names = "rx";
status = "disabled";
};
can1: can@0x16111000 {
compatible = "ls,lscanfd";
compatible = "loongson,ls-canfd";
reg = <0 0x16110400 0 0x400>;
ls,clock-frequency = <200000000>;
ls,canfd-dmarx;
interrupt-parent = <&icu>;
interrupts = <9>;
pinctrl-0 = <&can1_pins>;
pinctrl-names = "default";
dmas = <&dma 1 0xaae>;
dma-names = "rx";
status = "disabled";
};
can2: can@0x16112000 {
compatible = "ls,lscanfd";
compatible = "loongson,ls-canfd";
reg = <0 0x16110800 0 0x400>;
ls,clock-frequency = <200000000>;
ls,canfd-dmarx;
interrupt-parent = <&icu>;
interrupts = <10>;
pinctrl-0 = <&can2_pins>;
pinctrl-names = "default";
dmas = <&dma 2 0xaae>;
dma-names = "rx";
status = "disabled";
};
can3: can@0x16113000 {
compatible = "ls,lscanfd";
compatible = "loongson,ls-canfd";
reg = <0 0x16110c00 0 0x400>;
ls,clock-frequency = <200000000>;
ls,canfd-dmarx;
interrupt-parent = <&icu>;
interrupts = <11>;
pinctrl-0 = <&can3_pins>;
pinctrl-names = "default";
dmas = <&dma 3 0xaae>;
dma-names = "rx";
status = "disabled";
};
@@ -622,7 +644,7 @@
status = "disabled";
};
iodma: iodma@0x1612c000{
dma: dma@0x1612c000{
compatible = "loongson,lsia-dma";
reg = <0 0x1612c000 0 0x100>;
#config-nr = <2>;
@@ -788,8 +810,8 @@
audio: audio@0x16114000 {
compatible = "loongson,ls-pcm-generic-audio";
reg = <0 0x16114000 0 0x4000>;
dmas = <&iodma 0 0xaf
&iodma 1 0xbf>;
dmas = <&dma 0 0xaf
&dma 1 0xbf>;
dma-names = "i2s_record", "i2s_play";
dma-mask = <0xffffffff 0xffffffff>;
status = "disabled";
@@ -412,7 +412,7 @@
uart4: serial@0x15100000 {
compatible = "ns16550a";
reg = <0 0x15100000 0 0x10>;
clock-frequency = <200000000>;
clock-frequency = <100000000>;
//interrupt-parent = <&extioiic>;
interrupt-parent = <&icu>;
interrupts = <39>;
@@ -425,7 +425,7 @@
uart5: serial@0x15100800 {
compatible = "ns16550a";
reg = <0 0x15100800 0 0x10>;
clock-frequency = <200000000>;
clock-frequency = <100000000>;
//interrupt-parent = <&extioiic>;
interrupt-parent = <&icu>;
interrupts = <39>;
@@ -438,7 +438,7 @@
uart6: serial@0x15200000 {
compatible = "ns16550a";
reg = <0 0x15200000 0 0x10>;
clock-frequency = <200000000>;
clock-frequency = <100000000>;
//interrupt-parent = <&extioiic>;
interrupt-parent = <&icu>;
interrupts = <53>;
@@ -451,7 +451,7 @@
uart7: serial@0x15200800 {
compatible = "ns16550a";
reg = <0 0x15200800 0 0x10>;
clock-frequency = <200000000>;
clock-frequency = <100000000>;
//interrupt-parent = <&extioiic>;
interrupt-parent = <&icu>;
interrupts = <54>;
@@ -71,5 +71,28 @@
pixelclk-active = <0>;
};
};
panel-ATK-MD1010R-1280x800{
width-mm = <229>;
height-mm = <149>;
label = "ATK-MD1010R-1280x800";
data-mapping = "jeida-24";
panel-timing {
clock-frequency = <71100000>;
hactive = <1280>;
vactive = <800>;
hsync-len = <10>;
hfront-porch = <70>;
hback-porch = <80>;
vfront-porch = <10>;
vback-porch = <10>;
vsync-len = <3>;
de-active = <1>;
hsync-active = <0>;
vsync-active = <0>;
pixelclk-active = <0>;
};
};
};
};
@@ -18,11 +18,17 @@
};
lcd_backlight: backlight {
compatible = "gpio-backlight";
gpios = <&gpio 84 GPIO_ACTIVE_HIGH>;
default-on;
};
panel: dvo-connector@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "panel-lvds", "auo,b101ean01";
//backlight = <&lcd_backlight>;
backlight = <&lcd_backlight>;
/* lcd power on control gpio */
// enable-gpios = <&pioA 3 GPIO_ACTIVE_HIGH>;
@@ -49,7 +49,7 @@
lcd_backlight: backlight {
compatible = "gpio-backlight";
gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
status = "okay";
default-on;
};
panel: dvo-connector@0 {
@@ -141,6 +141,7 @@
onewire {
compatible = "w1-gpio";
gpios = <&gpio 68 GPIO_ACTIVE_HIGH>;
status = "disabled";
};
};
@@ -180,16 +181,33 @@
&spi1 {
status = "okay";
spidev0@0 {
compatible = "rohm,dh2228fv";
reg = <0>;
spi-max-frequency = <25000000>;
};
};
&spi2 {
status = "ok"
pinctrl-0 = <&spi2_cs_as_gpio>;
pinctrl-names = "default";
num-chipselects = <2>;
cs-gpios = <&gpio 67 0>,
<&gpio 85 0>;
mcp3004@0 {
compatible = "mcp3004";
reg = <0>;
spi-max-frequency = <1500000>;
};
spidev1@1 {
compatible = "rohm,dh2228fv";
reg = <1>;
spi-max-frequency = <25000000>;
};
};
&gmac0 {
@@ -304,8 +322,4 @@
&sound {
status = "okay";
};
&pwm0 {
status = "okay";
};
};
@@ -1,4 +1,5 @@
CONFIG_LOCALVERSION=".lsgd"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ=y
@@ -1,4 +1,5 @@
CONFIG_LOCALVERSION=".lsgd"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ=y
@@ -1,4 +1,5 @@
CONFIG_LOCALVERSION=".lsgd"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_DEFAULT_HOSTNAME="Loongson(GD)"
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
@@ -1,4 +1,5 @@
CONFIG_LOCALVERSION=".lsgd"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_DEFAULT_HOSTNAME="Loongson(GD)"
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y