Commit 45300136 authored by carbon's avatar carbon

duos: support spi

parent 362832ac
...@@ -21,6 +21,14 @@ ...@@ -21,6 +21,14 @@
status = "okay"; status = "okay";
}; };
&spi3 {
status = "okay";
spidev@0 {
status = "okay";
};
};
&usb { &usb {
vbus-gpio = <&portb 6 0>; vbus-gpio = <&portb 6 0>;
}; };
......
...@@ -135,6 +135,11 @@ CONFIG_I2C=y ...@@ -135,6 +135,11 @@ CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX=y CONFIG_I2C_MUX=y
CONFIG_I2C_DESIGNWARE_PLATFORM=y CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_SPI=y
CONFIG_SPI_MASTER=y
CONFIG_SPI_DESIGNWARE=y
CONFIG_SPI_DW_MMIO=y
CONFIG_SPI_SPIDEV=y
# CONFIG_PTP_1588_CLOCK is not set # CONFIG_PTP_1588_CLOCK is not set
CONFIG_PINCTRL=y CONFIG_PINCTRL=y
CONFIG_CVITEK_PINCTRL_CV1835=y CONFIG_CVITEK_PINCTRL_CV1835=y
......
...@@ -21,6 +21,14 @@ ...@@ -21,6 +21,14 @@
status = "okay"; status = "okay";
}; };
&spi3 {
status = "okay";
spidev@0 {
status = "okay";
};
};
&usb { &usb {
vbus-gpio = <&portb 6 0>; vbus-gpio = <&portb 6 0>;
}; };
......
...@@ -135,6 +135,11 @@ CONFIG_I2C=y ...@@ -135,6 +135,11 @@ CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX=y CONFIG_I2C_MUX=y
CONFIG_I2C_DESIGNWARE_PLATFORM=y CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_SPI=y
CONFIG_SPI_MASTER=y
CONFIG_SPI_DESIGNWARE=y
CONFIG_SPI_DW_MMIO=y
CONFIG_SPI_SPIDEV=y
# CONFIG_PTP_1588_CLOCK is not set # CONFIG_PTP_1588_CLOCK is not set
CONFIG_PINCTRL=y CONFIG_PINCTRL=y
CONFIG_CVITEK_PINCTRL_CV1835=y CONFIG_CVITEK_PINCTRL_CV1835=y
......
...@@ -20,6 +20,12 @@ int cvi_board_init(void) ...@@ -20,6 +20,12 @@ int cvi_board_init(void)
//PINMUX_CONFIG(VIVO_D1, IIC4_SCL); //PINMUX_CONFIG(VIVO_D1, IIC4_SCL);
//PINMUX_CONFIG(VIVO_D0, IIC4_SDA); //PINMUX_CONFIG(VIVO_D0, IIC4_SDA);
// SPI3
PINMUX_CONFIG(VIVO_D8, SPI3_SDO);
PINMUX_CONFIG(VIVO_D7, SPI3_SDI);
PINMUX_CONFIG(VIVO_D6, SPI3_SCK);
PINMUX_CONFIG(VIVO_D5, SPI3_CS_X);
// USB // USB
PINMUX_CONFIG(USB_VBUS_EN, XGPIOB_5); PINMUX_CONFIG(USB_VBUS_EN, XGPIOB_5);
......
...@@ -3,6 +3,46 @@ ...@@ -3,6 +3,46 @@
mute-gpio-r = <&porta 30 GPIO_ACTIVE_LOW>; mute-gpio-r = <&porta 30 GPIO_ACTIVE_LOW>;
}; };
&spi0 {
status = "disabled";
num-cs = <1>;
spidev@0 {
compatible = "rohm,dh2228fv";
spi-max-frequency = <1000000>;
reg = <0>;
};
};
&spi1 {
status = "disabled";
num-cs = <1>;
spidev@0 {
compatible = "rohm,dh2228fv";
spi-max-frequency = <1000000>;
reg = <0>;
};
};
&spi2 {
status = "disabled";
num-cs = <1>;
spidev@0 {
compatible = "rohm,dh2228fv";
spi-max-frequency = <1000000>;
reg = <0>;
};
};
&spi3 {
status = "okay";
num-cs = <1>;
spidev@0 {
compatible = "rohm,dh2228fv";
spi-max-frequency = <1000000>;
reg = <0>;
};
};
&i2c1 { &i2c1 {
status = "disabled"; status = "disabled";
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment