Hello,
I am trying to get the serial UART to work on /dev/ttyS1 ; we want to use GPIO Pins PI18 and PI19.
So far we have tried to edit the sun7i-a20-olinuxino-lime2-emmc.dtb file which can be found at the /boot folder.
We converted that file from .dtb to .dts, and we edited all parameters concerning SPI to disabled:
Quote
spi@1c05000 {
compatible = "allwinner,sun4i-a10-spi";
reg = <0x1c05000 0x1000>;
interrupts = <0x0 0xa 0x4>;
clocks = <0x2 0x2c 0x2 0x70>;
clock-names = "ahb", "mod";
dmas = <0xb 0x1 0x1b 0xb 0x1 0x1a>;
dma-names = "rx", "tx";
status = "disabled";
#address-cells = <0x1>;
#size-cells = <0x0>;
num-cs = <0x4>;
phandle = <0x48>;
};
spi@1c06000 {
compatible = "allwinner,sun4i-a10-spi";
reg = <0x1c06000 0x1000>;
interrupts = <0x0 0xb 0x4>;
clocks = <0x2 0x2d 0x2 0x71>;
clock-names = "ahb", "mod";
dmas = <0xb 0x1 0x9 0xb 0x1 0x8>;
dma-names = "rx", "tx";
status = "disabled";
#address-cells = <0x1>;
#size-cells = <0x0>;
num-cs = <0x1>;
pinctrl-names = "default";
pinctrl-0 = <0xc 0xd>;
phandle = <0x49>;
};
then we edited the serial parameters, like this:
Quote
serial@1c28000 {
compatible = "snps,dw-apb-uart";
reg = <0x1c28000 0x400>;
interrupts = <0x0 0x1 0x4>;
reg-shift = <0x2>;
reg-io-width = <0x4>;
clocks = <0x2 0x58>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <0x2a>;
phandle = <0x89>;
};
serial@1c28400 {
compatible = "snps,dw-apb-uart";
reg = <0x1c28400 0x400>;
interrupts = <0x0 0x2 0x4>;
reg-shift = <0x2>;
reg-io-width = <0x4>;
clocks = <0x2 0x59>;
status = "disabled";
phandle = <0x8a>;
};
serial@1c28800 {
compatible = "snps,dw-apb-uart";
reg = <0x1c28800 0x400>;
interrupts = <0x0 0x3 0x4>;
reg-shift = <0x2>;
reg-io-width = <0x4>;
clocks = <0x2 0x5a>;
status = "okay";
phandle = <0x8b>;
};
serial@1c28c00 {
compatible = "snps,dw-apb-uart";
reg = <0x1c28c00 0x400>;
interrupts = <0x0 0x4 0x4>;
reg-shift = <0x2>;
reg-io-width = <0x4>;
clocks = <0x2 0x5b>;
status = "disabled";
phandle = <0x8c>;
};
serial@1c29000 {
compatible = "snps,dw-apb-uart";
reg = <0x1c29000 0x400>;
interrupts = <0x0 0x11 0x4>;
reg-shift = <0x2>;
reg-io-width = <0x4>;
clocks = <0x2 0x5c>;
status = "disabled";
phandle = <0x8d>;
};
serial@1c29400 {
compatible = "snps,dw-apb-uart";
reg = <0x1c29400 0x400>;
interrupts = <0x0 0x12 0x4>;
reg-shift = <0x2>;
reg-io-width = <0x4>;
clocks = <0x2 0x5d>;
status = "disabled";
phandle = <0x8e>;
};
serial@1c29800 {
compatible = "snps,dw-apb-uart";
reg = <0x1c29800 0x400>;
interrupts = <0x0 0x13 0x4>;
reg-shift = <0x2>;
reg-io-width = <0x4>;
clocks = <0x2 0x5e>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <0x2b>;
phandle = <0x8f>;
};
serial@1c29c00 {
compatible = "snps,dw-apb-uart";
reg = <0x1c29c00 0x400>;
interrupts = <0x0 0x14 0x4>;
reg-shift = <0x2>;
reg-io-width = <0x4>;
clocks = <0x2 0x5f>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <0x2c>;
phandle = <0x90>;
};
We changed the file back to .dtb format and copied it onto the /boot/dtb-4.19.17-sunxi folder.
Then we rebooted.
However, all tries to send something over the serial line simply fail, for example
echo 55 > /dev/ttyS1
fails.
Any clue of just how to get the serial line working is greatly appreciated.
We already chmod'ded chmod 777 /dev/ttyS* - doesn't help....
Any advice greatly appreciated.