mirror of
https://gitee.com/open-loongarch/linux-5.10.git
synced 2026-10-25 12:47:11 +08:00
lscanfd.ko is in driver/net/can/ls_can. usage: insmod lscanfd.ko insmod lscanfd_platform.ko
325 lines
5.4 KiB
Devicetree
325 lines
5.4 KiB
Devicetree
#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 "loongson2k300.dtsi"
|
|
#include "loongson_panel_param.dtsi"
|
|
|
|
/ {
|
|
model = "LS2K300-PAI";
|
|
|
|
chosen {
|
|
stdout-path = "serial0:115200n8";
|
|
bootargs = "earlycon";
|
|
};
|
|
|
|
/* not need memory node, we get memory info from boot params. */
|
|
//memory {
|
|
// name = "memory";
|
|
// device_type = "memory";
|
|
// reg = <0 0x00200000 0 0x0ee00000
|
|
// 0 0x90000000 0 0x10000000>;
|
|
//};
|
|
|
|
reserved-memory {
|
|
#address-cells = <2>;
|
|
#size-cells = <2>;
|
|
ranges;
|
|
|
|
linux,cma {
|
|
compatible = "shared-dma-pool";
|
|
reusable;
|
|
size = <0 0x02000000>;
|
|
linux,cma-default;
|
|
};
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
|
|
led1 {
|
|
label = "led1";
|
|
gpios = <&gpio 54 GPIO_ACTIVE_LOW>;
|
|
linux,default-trigger = "heartbeat";
|
|
default-state = "on";
|
|
};
|
|
};
|
|
|
|
lcd_backlight: backlight {
|
|
compatible = "gpio-backlight";
|
|
gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
|
|
default-on;
|
|
};
|
|
|
|
panel: dvo-connector@0 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
compatible = "panel-lvds", "auo,b101ean01";
|
|
backlight = <&lcd_backlight>;
|
|
|
|
/* lcd power on control gpio */
|
|
// enable-gpios = <&pioA 3 GPIO_ACTIVE_HIGH>;
|
|
// power-supply = <&vdd_lcd>;
|
|
#if 0 // 4.3' LCD
|
|
width-mm = <223>;
|
|
height-mm = <125>;
|
|
label = "ATK-MD0430R-800x480";
|
|
data-mapping = "jeida-24";
|
|
|
|
panel-timing {
|
|
clock-frequency = <27000000>;
|
|
hactive = <800>;
|
|
vactive = <480>;
|
|
hsync-len = <40>;
|
|
hfront-porch = <48>;
|
|
hback-porch = <40>;
|
|
vfront-porch = <13>;
|
|
vback-porch = <32>;
|
|
vsync-len = <1>;
|
|
de-active = <1>;
|
|
hsync-active = <0>;
|
|
vsync-active = <0>;
|
|
pixelclk-active = <0>;
|
|
};
|
|
#else // 7' LCD
|
|
width-mm = <180>;
|
|
height-mm = <110>;
|
|
label = "ATK-MD0700R-1024x600";
|
|
data-mapping = "jeida-24";
|
|
|
|
panel-timing {
|
|
clock-frequency = <51200000>;
|
|
hactive = <1024>;
|
|
vactive = <600>;
|
|
hsync-len = <20>;
|
|
hfront-porch = <160>;
|
|
hback-porch = <140>;
|
|
vfront-porch = <12>;
|
|
vback-porch = <20>;
|
|
vsync-len = <3>;
|
|
de-active = <1>;
|
|
hsync-active = <0>;
|
|
vsync-active = <0>;
|
|
pixelclk-active = <0>;
|
|
};
|
|
#endif
|
|
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;
|
|
};
|
|
|
|
humidity_sensor {
|
|
compatible = "dht11-sensor";
|
|
SHT11-gpios = <&gpio 61 GPIO_ACTIVE_HIGH>;
|
|
status = "okay";
|
|
};
|
|
|
|
// 虽然这个时钟在从模式下没用,但 es8388 驱动必须指定这个时钟
|
|
es8388_clk: es8388-clock {
|
|
compatible = "fixed-clock";
|
|
clock-frequency = <11289600>;
|
|
#clock-cells = <1>;
|
|
};
|
|
|
|
onewire {
|
|
compatible = "w1-gpio";
|
|
gpios = <&gpio 68 GPIO_ACTIVE_HIGH>;
|
|
status = "disabled";
|
|
};
|
|
};
|
|
|
|
&uart0 {
|
|
status = "okay";
|
|
};
|
|
|
|
&uart2 {
|
|
status = "ok"
|
|
};
|
|
|
|
&uart5 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&uart6 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&uart7 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&uart8 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&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 = "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 {
|
|
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>; //有数据时闪烁
|
|
};
|
|
};
|
|
};
|
|
|
|
&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"
|
|
|
|
touchpad: gt9147@14 {
|
|
compatible = "goodix,gt9147";
|
|
reg = <0x14>;
|
|
// 2K300 GPIO 支持中断控制
|
|
// GPIO 中断号为 vhwirq-base + pinnum (170 = 128 + 42)
|
|
interrupt-parent = <&gpio>;
|
|
interrupts = <170 IRQ_TYPE_EDGE_FALLING>;
|
|
irq-gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
|
|
reset-gpios = <&gpio 55 GPIO_ACTIVE_LOW>;
|
|
};
|
|
};
|
|
|
|
&i2c1 {
|
|
status = "ok"
|
|
};
|
|
|
|
&i2c2 {
|
|
status = "okay";
|
|
|
|
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>;
|
|
};
|
|
};
|
|
|
|
|
|
&can0 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&can1 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&can2 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&can3 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&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";
|
|
};
|
|
|
|
&i2s {
|
|
status = "okay";
|
|
};
|
|
|
|
&audio {
|
|
status = "okay";
|
|
};
|
|
|
|
&sound {
|
|
status = "okay";
|
|
}; |