mirror of
https://gitee.com/open-loongarch/linux-6.12.git
synced 2026-10-28 22:17:11 +08:00
Squashed commit of the following:
commit 36ff1f997966de5f83dffed9ad2c799634f9997d Author: Ilikara <3435193369@qq.com> Date: Wed Apr 30 00:42:40 2025 +0800 feat: remove unused code in 99pi wifi dts commit 5d155e9fcb0adec13e022a83199e1fbf10ec5515 Author: ilikara <3435193369@qq.com> Date: Tue Apr 29 15:33:33 2025 +0800 feat: add 99pi-wifi to boot_parm.h setup.c and rename 99pi's devicetree commit 47888cd64c4aa54eaa23a346ef6ac08c73c23534 Merge: e89978dcc2d8b839ddAuthor: Ilikara <3435193369@qq.com> Date: Tue Apr 29 11:05:24 2025 +0800 Merge branch 'master' into feat/99pai commit e89978dccba5cfabb340b2b87456353b9d8763b7 Author: Ilikara <3435193369@qq.com> Date: Tue Apr 29 10:59:56 2025 +0800 feat: use clocktree to get uart clock commit 95f6d3dd313935f936ab9bf967ec0b2ed275c7d6 Merge: 459d4692f881dbd52eAuthor: Ilikara <3435193369@qq.com> Date: Sun Apr 20 00:08:53 2025 +0800 Merge branch 'master' into feat/99pai commit 459d4692f4e6d3e5890cf50211ca5f5ceaaa1e3e Author: ilikara <3435193369@qq.com> Date: Tue Apr 8 07:12:19 2025 +0000 build: support *make vmlinuz* commit f11b0d1ceedf0eef6cc85bcb4ab21ac4027da525 Merge: 894f1392f9bd4ef8edAuthor: ilikara <3435193369@qq.com> Date: Sun Apr 6 06:08:41 2025 +0000 Merge branch 'master' into feat/99pai commit 894f1392f8707c1fb092372fc8be58df4682f914 Merge: 8fad95d7dff60a514fAuthor: ilikara <3435193369@qq.com> Date: Fri Mar 28 08:49:41 2025 +0000 Merge remote-tracking branch 'origin/master' into feat/99pai commit 8fad95d7d6f1ec1f8c8b9ba8bb8ab89813eba5ff Merge: a5752b0e46273342ddAuthor: ilikara <3435193369@qq.com> Date: Fri Mar 14 14:17:50 2025 +0000 Merge branch 'master' into feat/99pai commit a5752b0e4788ed2b5189616c94f97967e92b394a Author: ilikara <3435193369@qq.com> Date: Wed Mar 5 09:15:32 2025 +0000 feat: update 99pai dts & config commit f8b2a5fb938f55d77689a4332639009b2bb8c480 Merge: fdc292cbbd86346d04Author: ilikara <3435193369@qq.com> Date: Tue Mar 4 08:00:21 2025 +0000 Merge branch 'master' into feat/99pai commit fdc292cbb95631ff16496b449dbac60f946e80d4 Merge: cfa4e13b2924394055Author: ilikara <3435193369@qq.com> Date: Sat Feb 22 15:59:49 2025 +0000 Merge branch 'master' into feat/99pai commit cfa4e13b293d0e540fbd86a742b10858dfc35305 Author: ilikara <3435193369@qq.com> Date: Thu Feb 20 16:15:36 2025 +0000 fix: fix merge error commit 5c743cf14fd853b65044c465742b8926f3d5821e Merge: 34b5c4ced0b45cc3a3Author: ilikara <3435193369@qq.com> Date: Thu Feb 20 16:11:03 2025 +0000 Merge branch 'master' into feat/99pai commit 34b5c4ced86f98f657b0bf058627c883c90e274d Author: ilikara <3435193369@qq.com> Date: Wed Feb 19 11:48:31 2025 +0000 feat: support 99pai
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
ifdef CONFIG_DTB_MATCH_BY_BOARD_NAME
|
||||
dtb-$(CONFIG_LOONGSON_2K300) += ls2k300_mini_dp.dtb ls2k300_vanguard_pi.dtb ls2k300_gongkong_gbkpgk0.dtb \
|
||||
ls2k300_alientek.dtb
|
||||
ls2k300_alientek.dtb ls2k300_99pi_wifi.dtb
|
||||
dtb-$(CONFIG_LOONGSON_2K1000) += ls2k1000_dp.dtb
|
||||
|
||||
obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
|
||||
|
||||
@@ -132,6 +132,10 @@
|
||||
pinctrl-single,register-width = <32>;
|
||||
pinctrl-single,function-mask = <0x3>;
|
||||
|
||||
uart0_pins: pinmux_G40_G41_as_uart0 {
|
||||
pinctrl-single,bits = <0x8 0x000f0000 0x000f0000>;
|
||||
};
|
||||
|
||||
uart1_pins: pinmux_G42_G43_as_uart1 {
|
||||
pinctrl-single,bits = <0x8 0x00f00000 0x00f00000>;
|
||||
};
|
||||
@@ -200,10 +204,19 @@
|
||||
pinctrl-single,bits = <0x14 0x00000a00 0x000000f00>;
|
||||
};
|
||||
|
||||
spi0_pins: pinmux_G56_G59_as_spi0 {
|
||||
pinctrl-single,bits = <0xc 0x00ff0000 0x00ff0000
|
||||
0x10 0x00001400 0x00003c00>;
|
||||
};
|
||||
|
||||
spi1_pins: pinmux_G60_G63_as_spi1 {
|
||||
pinctrl-single,bits = <0xc 0xff000000 0xff000000>;
|
||||
};
|
||||
|
||||
spi1_cs_as_gpio: pinmux_G60_G62_as_spi1 {
|
||||
pinctrl-single,bits = <0xc 0x3f000000 0x3f000000>;
|
||||
};
|
||||
|
||||
spi2_pins: pinmux_G64_G67_as_spi2 {
|
||||
pinctrl-single,bits = <0x10 0x000000ff 0x000000ff>;
|
||||
};
|
||||
@@ -348,20 +361,52 @@
|
||||
};
|
||||
};
|
||||
|
||||
pwm0_pins: pinmux_G86_as_pwm0 {
|
||||
pinctrl-single,bits = <0x14 0x00002000 0x00003000>;
|
||||
pwm0_pins: pwm0-pins {
|
||||
pwm0_mux_m0: pinmux_G64_as_pwm0 {
|
||||
pinctrl-single,bits = <0x10 0x00000001 0x00000003>;
|
||||
};
|
||||
pwm0_mux_m1: pinmux_G86_as_pwm0 {
|
||||
pinctrl-single,bits = <0x14 0x00002000 0x00003000>;
|
||||
};
|
||||
pwm0_mux_m2: pinmux_G102_as_pwm0 {
|
||||
pinctrl-single,bits = <0x18 0x00003000 0x00003000>;
|
||||
};
|
||||
};
|
||||
|
||||
pwm1_pins: pinmux_G87_as_pwm1 {
|
||||
pinctrl-single,bits = <0x14 0x00008000 0x0000c000>;
|
||||
pwm1_pins: pwm1-pins {
|
||||
pwm1_mux_m0: pinmux_G65_as_pwm1 {
|
||||
pinctrl-single,bits = <0x10 0x00000004 0x0000000c>;
|
||||
};
|
||||
pwm1_mux_m1: pinmux_G87_as_pwm1 {
|
||||
pinctrl-single,bits = <0x14 0x00008000 0x0000c000>;
|
||||
};
|
||||
pwm1_mux_m2: pinmux_G103_as_pwm1 {
|
||||
pinctrl-single,bits = <0x18 0x0000c000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
|
||||
pwm2_pins: pwm2-pins {
|
||||
pwm2_mux_m0: pinmux_G66_as_pwm2 {
|
||||
pinctrl-single,bits = <0x10 0x00000010 0x00000030>;
|
||||
};
|
||||
pwm2_mux_m1: pinmux_G88_as_pwm2 {
|
||||
pinctrl-single,bits = <0x14 0x00020000 0x00030000>;
|
||||
};
|
||||
pwm2_mux_m2: pinmux_G104_as_pwm2 {
|
||||
pinctrl-single,bits = <0x18 0x00030000 0x00030000>;
|
||||
};
|
||||
};
|
||||
|
||||
pwm2_pins: pinmux_G88_as_pwm2 {
|
||||
pinctrl-single,bits = <0x14 0x00020000 0x00030000>;
|
||||
};
|
||||
|
||||
pwm3_pins: pinmux_G89_as_pwm3 {
|
||||
pinctrl-single,bits = <0x14 0x00080000 0x000c0000>;
|
||||
pwm3_pins: pwm3-pins {
|
||||
pwm3_mux_m0: pinmux_G67_as_pwm3 {
|
||||
pinctrl-single,bits = <0x10 0x00000040 0x000000c0>;
|
||||
};
|
||||
pwm3_mux_m1: pinmux_G89_as_pwm3 {
|
||||
pinctrl-single,bits = <0x14 0x00080000 0x000c0000>;
|
||||
};
|
||||
pwm3_mux_m2: pinmux_G105_as_pwm3 {
|
||||
pinctrl-single,bits = <0x18 0x000c0000 0x000c0000>;
|
||||
};
|
||||
};
|
||||
|
||||
tim1_ch1:pinmux_G81_as_tim1_ch1 {
|
||||
@@ -436,6 +481,9 @@
|
||||
interrupt-parent = <&liointc0>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
no-loopback-test;
|
||||
pinctrl-0 = <&uart0_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart1: serial@0x16100400 {
|
||||
@@ -731,6 +779,8 @@
|
||||
interrupt-parent = <&liointc1>;
|
||||
interrupts = <12 IRQ_TYPE_LEVEL_HIGH>; // 44 - 32 = 12
|
||||
clock-frequency = <200000000>;
|
||||
pinctrl-0 = <&spi0_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -900,7 +950,7 @@
|
||||
interrupt-parent = <&liointc0>;
|
||||
interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#pwm-cells = <2>;
|
||||
pinctrl-0 = <&pwm0_pins>;
|
||||
pinctrl-0 = <&pwm0_mux_m1>;
|
||||
pinctrl-names = "default";
|
||||
clock-frequency = <200000000>;
|
||||
status = "disabled";
|
||||
@@ -912,7 +962,7 @@
|
||||
interrupt-parent = <&liointc0>;
|
||||
interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#pwm-cells = <2>;
|
||||
pinctrl-0 = <&pwm1_pins>;
|
||||
pinctrl-0 = <&pwm1_mux_m1>;
|
||||
pinctrl-names = "default";
|
||||
clock-frequency = <200000000>;
|
||||
status = "disabled";
|
||||
@@ -924,7 +974,7 @@
|
||||
interrupt-parent = <&liointc0>;
|
||||
interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#pwm-cells = <2>;
|
||||
pinctrl-0 = <&pwm2_pins>;
|
||||
pinctrl-0 = <&pwm2_mux_m1>;
|
||||
pinctrl-names = "default";
|
||||
clock-frequency = <200000000>;
|
||||
status = "disabled";
|
||||
@@ -936,7 +986,7 @@
|
||||
interrupt-parent = <&liointc0>;
|
||||
interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#pwm-cells = <2>;
|
||||
pinctrl-0 = <&pwm3_pins>;
|
||||
pinctrl-0 = <&pwm3_mux_m1>;
|
||||
pinctrl-names = "default";
|
||||
clock-frequency = <200000000>;
|
||||
status = "disabled";
|
||||
@@ -1051,7 +1101,7 @@
|
||||
compatible = "loongson,ls-pcm-generic-audio";
|
||||
reg = <0 0x16114000 0 0x4000>;
|
||||
dmas = <&dma 0 0xaf
|
||||
&dma 1 0xbf>;
|
||||
&dma 1 0xbf>;
|
||||
dma-names = "i2s_record", "i2s_play";
|
||||
dma-mask = <0xffffffff 0xffffffff>;
|
||||
status = "disabled";
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
#include <dt-bindings/input/linux-event-codes.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
#include "loongson-2k0300.dtsi"
|
||||
#include "loongson_panel_param.dtsi"
|
||||
|
||||
/ {
|
||||
model = "LS2K300-99PI-WIFI";
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
bootargs = "earlycon";
|
||||
};
|
||||
|
||||
/* not need memory node, we get memory info from boot params. */
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led1 {
|
||||
label = "led1";
|
||||
gpios = <&gpio 83 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
default-state = "on";
|
||||
};
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
linux,cma {
|
||||
compatible = "shared-dma-pool";
|
||||
reusable;
|
||||
size = <0 0x02000000>;
|
||||
linux,cma-default;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
phy-handle = <&yt8511h0>;
|
||||
mdio {
|
||||
compatible = "snps,dwmac-mdio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
yt8511h0: ethernet-phy@0 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0>;
|
||||
motorcomm,led0_cfg = <0x40>; //千兆常亮
|
||||
motorcomm,led1_cfg = <0x30>; //百兆 十兆常亮
|
||||
motorcomm,led2_cfg = <0x2600>; //有数据时闪烁
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
status = "disabled"; // 在 LCD 排线处
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
spi-flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
spi-max-frequency = <25000000>;
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
status = "okay";
|
||||
|
||||
spidev0@0 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <25000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
status = "disabled"; // 与 PWM0-3 的 MUX0 冲突
|
||||
|
||||
spidev1@0 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <25000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&timers1 {
|
||||
status = "disabled";
|
||||
/delete-property/ dmas;
|
||||
/delete-property/ dma-names;
|
||||
pinctrl-0 = <&atim3_pin_m1>, <&atim3n_pin_m1>; // 在 LCD 排线处和 S_LED
|
||||
pinctrl-names = "default";
|
||||
|
||||
pwm {
|
||||
compatible = "loongson,ls2k-pwm-timer";
|
||||
#pwm-cells = <2>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&timers2 {
|
||||
status = "okay";
|
||||
dmas = <&dma 2 0x400>, <&dma 3 0x400>;
|
||||
dma-names = "ch3", "ch4";
|
||||
pinctrl-0 = <>im2_pin_m1>, <>im3_pin_m1>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
pwm {
|
||||
compatible = "loongson,ls2k-pwm-timer";
|
||||
#pwm-cells = <2>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm0_mux_m0>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&pwm1 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm1_mux_m0>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm2_mux_m0>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&pwm3 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm3_mux_m0>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&can2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&can3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&adc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rtc0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdio1 {
|
||||
pinctrl-0 = <&sdio1_pins>;
|
||||
pinctrl-names = "default";
|
||||
cap-sd-highspeed;
|
||||
cap-mmc-highspeed;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&gpio 82 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -115,6 +115,7 @@ extern u32 __dtb_ls2k300_mini_dp_begin[];
|
||||
extern u32 __dtb_ls2k300_vanguard_pi_begin[];
|
||||
extern u32 __dtb_ls2k300_gongkong_gbkpgk0_begin[];
|
||||
extern u32 __dtb_ls2k300_alientek_begin[];
|
||||
extern u32 __dtb_ls2k300_99pi_wifi_begin[];
|
||||
extern char __dtb_start[];
|
||||
extern struct boot_params *efi_bp;
|
||||
extern struct loongson_board_info b_info;
|
||||
|
||||
@@ -310,6 +310,7 @@ char *board_names[] = {
|
||||
"LS2K300-PAI",
|
||||
"LS2K300-GONGKONG-GBKPGK0",
|
||||
"LS2K300-ATK-DL2K0300B-V01",
|
||||
"LS2K300-99PI-WIFI",
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
@@ -330,6 +331,7 @@ void *fdts[] = {
|
||||
&__dtb_ls2k300_vanguard_pi_begin,
|
||||
&__dtb_ls2k300_gongkong_gbkpgk0_begin,
|
||||
&__dtb_ls2k300_alientek_begin,
|
||||
&__dtb_ls2k300_99pi_wifi_begin,
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user