Files
openloongarch-linux-6.12/arch/loongarch/boot/dts/ls2k300_tewei.dts
T
maoxiaochuan 7ffd18ab9d Update to 14fc3074cfe039
1. 添加带irq处理的gpio驱动
2. 龙芯2k系列添加mmc驱动支持
3. 添加看门狗驱动
4. dtb支持从command line中的board_name字段判断
5. 支持内存分布描述数据从固件传入的数据获取
6. 支持从bootcmdline获取ramdisk启动的地址和所用大小
7. 添加2k300的i2c总线驱动
8. 2k300使用新的spi 和 spi-io 驱动
9. CPU芯片温度传感器支持2k300的计算方式
10. 添加2k300的adc驱动
11. pwm: update default pwm freq to 50Mhz
12. loongson pwm 驱动支持dts使用clock-frequency形式声明频率
13. loongson pwm 确保disable时输出的电平为空闲电平
14. 2k300编译配置使能pwm leds功能
15. 2k300的gmac的phy-mode默认使用rgmii-id
16. 2k300先锋派设置YT8531的内部延迟
17. YT8531 phy 支持设置led的工作模式
18. LCD屏幕 支持cmdline的panel属性选择某一款板卡的dts配置,实现屏幕切换
19. 添加脚本用于快速选择板卡配置文件
20. 添加CAN驱动
21. 添加音频驱动
22. 优化OTG兼容性

Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2025-02-13 16:03:32 +08:00

235 lines
3.9 KiB
Devicetree

#include "ls2k300_g2k03z0_core_v10.dtsi"
#include "loongson_panel_param.dtsi"
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/pwm/pwm.h>
/ {
model = "LS2K300-TEWEI";
leds {
compatible = "gpio-leds";
run_led {
label = "run_led";
gpios = <&gpio 85 GPIO_ACTIVE_LOW>;
linux,default-trigger = "heartbeat";
default-state = "on";
};
err_led {
label = "err_led";
gpios = <&gpio 82 GPIO_ACTIVE_LOW>;
default-state = "off";
};
};
lcd_backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm0 0 5000000 PWM_POLARITY_INVERTED>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <7>;
};
panel: dvo-connector@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "panel-lvds", "auo,b101ean01";
backlight = <&lcd_backlight>;
width-mm = <261>;
height-mm = <163>;
label = "TM121JDGP30-1280x800";
data-mapping = "jeida-24";
panel-timing {
clock-frequency = <72200000>;
hactive = <1280>;
vactive = <800>;
hsync-len = <4>;
hfront-porch = <72>;
hback-porch = <84>;
vfront-porch = <15>;
vback-porch = <23>;
vsync-len = <4>;
de-active = <1>;
hsync-active = <0>;
vsync-active = <0>;
pixelclk-active = <0>;
};
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
dvo_connector_in: endpoint@0 {
reg = <0>;
remote-endpoint = <&dc_out_rgb0>;
};
};
};
vccio_codec: 3_3V{
compatible = "regulator-fixed";
regulator-name = "VCC_IO";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
// 虽然这个时钟在从模式下没用,但 es8388 驱动必须指定这个时钟
es8388_clk: es8388-clock {
compatible = "fixed-clock";
clock-frequency = <12288000>;
#clock-cells = <1>;
};
};
&dc {
status = "ok"
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
dc_out_rgb0: endpoint {
remote-endpoint = <&dvo_connector_in>;
};
};
};
};
&i2c0 {
status = "ok"
lm75bdp@48 {
compatible = "national,lm75b";
reg = <0x48>;
};
eeprom@50 {
compatible = "atmel,24c64";
reg = <0x50>;
pagesize = <32>;
};
};
&i2c1 {
status = "ok"
codec: es8388@11{
compatible = "everest,es8388";
reg = <0x11>;
AVDD-supply = <&vccio_codec>;
DVDD-supply = <&vccio_codec>;
HPVDD-supply = <&vccio_codec>;
PVDD-supply = <&vccio_codec>;
clocks = <&es8388_clk 0>;
};
};
&i2c2 {
status = "ok"
pcf8574@20 {
compatible = "nxp,pcf8574";
reg = <0x20>;
// 2K300 GPIO 支持中断控制
// GPIO 中断号为 vhwirq-base + pinnum (216 = 128 + 88)
interrupt-parent = <&gpio>;
interrupts = <216 0>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
};
&i2c3 {
status = "ok"
};
&uart1 {
status = "ok"
};
&uart2 {
status = "ok"
};
&uart3 {
status = "ok"
};
&can2 {
status = "ok"
};
&spi1 {
status = "ok"
spi_wk2xxx0: spi_wk2xxx@0 {
status = "okay";
compatible = "wkmic,wk2124_spi";
reg = <0x0>;
spi-max-frequency = <10000000>;
reset-gpio = <&gpio 83 GPIO_ACTIVE_HIGH>;
irq-gpio = <&gpio 84 IRQ_TYPE_EDGE_FALLING>;
use-common-reset-gpio;
};
};
&spi2 {
status = "ok"
spi_wk2xxx1: spi_wk2xxx@0 {
status = "okay";
compatible = "wkmic,wk2124_spi";
reg = <0x0>;
spi-max-frequency = <10000000>;
reset-gpio = <&gpio 83 GPIO_ACTIVE_HIGH>;
irq-gpio = <&gpio 69 IRQ_TYPE_EDGE_FALLING>;
use-common-reset-gpio;
};
};
&rtc0 {
status = "okay";
};
&sdio1 {
pinctrl-0 = <&sdio1_pins>;
pinctrl-names = "default";
cap-sd-highspeed;
cap-mmc-highspeed;
bus-width = <4>;
cd-gpios = <&gpio 81 GPIO_ACTIVE_LOW>;
status = "okay";
};
&pwm0 {
status = "okay";
#pwm-cells = <3>;
};
&i2s {
status = "okay";
//slave-mode;
//mclk-fixed = <12288000>;
};
&audio {
status = "okay";
};
&sound {
status = "okay";
loongson,audio-codec = <&codec>;
// Easy Compatible for asound.state Configure
loongson,sound-card-name = "ES8388";
};