mirror of
https://gitee.com/open-loongarch/linux-5.10.git
synced 2026-10-25 20:57:11 +08:00
update to 5eee671596dd3
1. sound/soc/codec: Remove Configure from driver, Switch Codec to Master Mode 2. drivers/net/can: ls_canfd: Add driver elf file 3. 2K300: defconfig: 2k300 add LS_CANFD Support 4. 2K300-PAI: Add a common dtsi file named ls2k300-pai-common.dtsi, the ls2k300_pai_xxx.dts files can include it.
This commit is contained in:
@@ -497,8 +497,6 @@
|
||||
clock-frequency = <0 200000000>;
|
||||
dma-mask = <0xffffffff 0xffffffff>;
|
||||
bus-width = <1>;
|
||||
cap-sd-highspeed;
|
||||
cap-mmc-highspeed;
|
||||
//no-mmc;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -3,139 +3,7 @@
|
||||
#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 = <223>;
|
||||
height-mm = <125>;
|
||||
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;
|
||||
};
|
||||
|
||||
// 虽然这个时钟在从模式下没用,但 es8388 驱动必须指定这个时钟
|
||||
es8388_clk: es8388-clock {
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <11289600>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
#include "ls2k300_pai_common.dtsi"
|
||||
|
||||
&uart2 {
|
||||
status = "ok"
|
||||
@@ -157,16 +25,6 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
spi-flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
spi-max-frequency = <25000000>;
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
status = "okay";
|
||||
|
||||
@@ -197,74 +55,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&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";
|
||||
};
|
||||
@@ -281,36 +71,6 @@
|
||||
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";
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -0,0 +1,265 @@
|
||||
#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 = <223>;
|
||||
height-mm = <125>;
|
||||
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;
|
||||
};
|
||||
|
||||
// 虽然这个时钟在从模式下没用,但 es8388 驱动必须指定这个时钟
|
||||
es8388_clk: es8388-clock {
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <12288000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
spi-flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
spi-max-frequency = <25000000>;
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&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";
|
||||
slave-mode;
|
||||
mclk-fixed = <12288000>;
|
||||
};
|
||||
|
||||
&audio {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sound {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -3,139 +3,7 @@
|
||||
#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 = <223>;
|
||||
height-mm = <125>;
|
||||
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;
|
||||
};
|
||||
|
||||
// 虽然这个时钟在从模式下没用,但 es8388 驱动必须指定这个时钟
|
||||
es8388_clk: es8388-clock {
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <11289600>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
#include "ls2k300_pai_common.dtsi"
|
||||
|
||||
&uart2 {
|
||||
status = "okay";
|
||||
@@ -165,16 +33,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
spi-flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
spi-max-frequency = <25000000>;
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -183,74 +41,6 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&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 = "okay";
|
||||
};
|
||||
@@ -267,32 +57,3 @@
|
||||
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";
|
||||
};
|
||||
|
||||
&i2s {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&audio {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sound {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -3,151 +3,21 @@
|
||||
#include <dt-bindings/input/linux-event-codes.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
#include "loongson2k300.dtsi"
|
||||
#include "loongson_panel_param.dtsi"
|
||||
#include "ls2k300_pai_common.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 = <223>;
|
||||
height-mm = <125>;
|
||||
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>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
status = "ok"
|
||||
};
|
||||
@@ -168,16 +38,6 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
spi-flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
spi-max-frequency = <25000000>;
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
status = "okay";
|
||||
|
||||
@@ -209,74 +69,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&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";
|
||||
};
|
||||
@@ -292,33 +84,3 @@
|
||||
&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";
|
||||
};
|
||||
|
||||
@@ -203,6 +203,8 @@ CONFIG_NETLINK_DIAG=y
|
||||
CONFIG_CGROUP_NET_PRIO=y
|
||||
CONFIG_BPF_JIT=y
|
||||
CONFIG_CAN=y
|
||||
CONFIG_CAN_LSCANFD=y
|
||||
CONFIG_CAN_LSCANFD_PLATFORM=y
|
||||
CONFIG_CFG80211=y
|
||||
CONFIG_MAC80211=y
|
||||
CONFIG_RFKILL=y
|
||||
|
||||
Reference in New Issue
Block a user