!8 feat: support CTCI 99pi-tf

Merge pull request !8 from driver1998/99pi-tf
This commit is contained in:
maoxiaochuan
2025-05-05 02:17:43 +00:00
committed by Gitee
6 changed files with 207 additions and 179 deletions
+1 -1
View File
@@ -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_99pi_wifi.dtb
ls2k300_alientek.dtb ls2k300_99pi_wifi.dtb ls2k300_99pi_tf.dtb
dtb-$(CONFIG_LOONGSON_2K1000) += ls2k1000_dp.dtb
obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
+184
View File
@@ -0,0 +1,184 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2025 Loongson Technology Corporation Limited
*/
/ {
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";
pinctrl-0 = <&qspi0_pins>;
pinctrl-names = "default";
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 = "okay"; // 与 PWM0-3 的 MUX0 冲突
spidev1@0 {
compatible = "rohm,dh2228fv";
reg = <0>;
spi-max-frequency = <25000000>;
};
};
&timers1 {
status = "okay";
/delete-property/ dmas;
/delete-property/ dma-names;
pinctrl-0 = <&atim3n_pin_m1>; // LCD PWM 背光,备用
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 = <&gtim2_pin_m1>, <&gtim3_pin_m1>;
pinctrl-names = "default";
pwm {
compatible = "loongson,ls2k-pwm-timer";
#pwm-cells = <2>;
status = "okay";
};
};
&pwm0 {
status = "disabled";
pinctrl-0 = <&pwm0_mux_m0>;
pinctrl-names = "default";
};
&pwm1 {
status = "disabled";
pinctrl-0 = <&pwm1_mux_m0>;
pinctrl-names = "default";
};
&pwm2 {
status = "disabled";
pinctrl-0 = <&pwm2_mux_m0>;
pinctrl-names = "default";
};
&pwm3 {
status = "disabled";
pinctrl-0 = <&pwm3_mux_m0>;
pinctrl-names = "default";
};
&can2 {
status = "okay";
};
&can3 {
status = "okay";
};
&adc {
status = "okay";
};
&rtc0 {
status = "okay";
};
&sdio1 {
cd-gpios = <&gpio 82 GPIO_ACTIVE_LOW>;
status = "okay";
};
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2025 Loongson Technology Corporation Limited
*/
/dts-v1/;
#include "loongson-2k0300.dtsi"
#include "loongson_panel_param.dtsi"
#include "ls2k300_99pi.dtsi"
/ {
model = "LS2K300-99PI-TF";
};
&emmc {
status = "disabled";
};
+1 -178
View File
@@ -7,185 +7,8 @@
#include "loongson-2k0300.dtsi"
#include "loongson_panel_param.dtsi"
#include "ls2k300_99pi.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";
pinctrl-0 = <&qspi0_pins>;
pinctrl-names = "default";
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 = "okay"; // 与 PWM0-3 的 MUX0 冲突
spidev1@0 {
compatible = "rohm,dh2228fv";
reg = <0>;
spi-max-frequency = <25000000>;
};
};
&timers1 {
status = "okay";
/delete-property/ dmas;
/delete-property/ dma-names;
pinctrl-0 = <&atim3n_pin_m1>; // LCD PWM 背光,备用
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 = <&gtim2_pin_m1>, <&gtim3_pin_m1>;
pinctrl-names = "default";
pwm {
compatible = "loongson,ls2k-pwm-timer";
#pwm-cells = <2>;
status = "okay";
};
};
&pwm0 {
status = "disabled";
pinctrl-0 = <&pwm0_mux_m0>;
pinctrl-names = "default";
};
&pwm1 {
status = "disabled";
pinctrl-0 = <&pwm1_mux_m0>;
pinctrl-names = "default";
};
&pwm2 {
status = "disabled";
pinctrl-0 = <&pwm2_mux_m0>;
pinctrl-names = "default";
};
&pwm3 {
status = "disabled";
pinctrl-0 = <&pwm3_mux_m0>;
pinctrl-names = "default";
};
&can2 {
status = "okay";
};
&can3 {
status = "okay";
};
&adc {
status = "okay";
};
&rtc0 {
status = "okay";
};
&sdio1 {
cd-gpios = <&gpio 82 GPIO_ACTIVE_LOW>;
status = "okay";
};
@@ -116,6 +116,7 @@ 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 u32 __dtb_ls2k300_99pi_tf_begin[];
extern char __dtb_start[];
extern struct boot_params *efi_bp;
extern struct loongson_board_info b_info;
+2
View File
@@ -311,6 +311,7 @@ char *board_names[] = {
"LS2K300-GONGKONG-GBKPGK0",
"LS2K300-ATK-DL2K0300B-V01",
"LS2K300-99PI-WIFI",
"LS2K300-99PI-TF",
#endif
NULL
};
@@ -332,6 +333,7 @@ void *fdts[] = {
&__dtb_ls2k300_gongkong_gbkpgk0_begin,
&__dtb_ls2k300_alientek_begin,
&__dtb_ls2k300_99pi_wifi_begin,
&__dtb_ls2k300_99pi_tf_begin,
#endif
NULL
};