meta-odroid
meta-odroid copied to clipboard
Question: Odroid-c4 UART on pin-header
Hi,
I use an odroid-c4 with kirkstone release of meta-odroid. Kernel recipe linux-yocto is used.
I want to use Pins 8 and 10 of pin-header as UART to communicate with an external device. The wiki describes how to do this with the official OS Release by adding an device-tree overlay. To check my hw-setup I did this and it worked fine.
Now I want to add the UART functionality to my yocto build. I tried to add the changes made in the device tree overlay to the kernel sources without success. My changes to the device-tree files are appended.
I guess there is something wrong with the pinmux, but I don't see where to change this.
Does anybody has an idea how to get the pin-header uart up and running on kirkstone release?
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index 369334076467..b9f91924f025 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -2057,7 +2057,7 @@ uart_AO: serial@3000 {
interrupts = <GIC_SPI 193 IRQ_TYPE_EDGE_RISING>;
clocks = <&xtal>, <&clkc_AO CLKID_AO_UART>, <&xtal>;
clock-names = "xtal", "pclk", "baud";
- status = "disabled";
+ status = "okay";
};
uart_AO_B: serial@4000 {
@@ -2067,7 +2067,7 @@ uart_AO_B: serial@4000 {
interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
clocks = <&xtal>, <&clkc_AO CLKID_AO_UART2>, <&xtal>;
clock-names = "xtal", "pclk", "baud";
- status = "disabled";
+ status = "okay";
};
i2c_AO: i2c@5000 {
@@ -2303,7 +2303,7 @@ uart_C: serial@22000 {
interrupts = <GIC_SPI 93 IRQ_TYPE_EDGE_RISING>;
clocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>;
clock-names = "xtal", "pclk", "baud";
- status = "disabled";
+ status = "okay";
};
uart_B: serial@23000 {
@@ -2312,7 +2312,7 @@ uart_B: serial@23000 {
interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>;
clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>;
clock-names = "xtal", "pclk", "baud";
- status = "disabled";
+ status = "okay";
};
uart_A: serial@24000 {
@@ -2321,7 +2321,7 @@ uart_A: serial@24000 {
interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>;
clock-names = "xtal", "pclk", "baud";
- status = "disabled";
+ status = "okay";
fifo-size = <128>;
};
};
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
index ee8aa390ea56..d0da63fe8a01 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
@@ -9,7 +9,7 @@
/ {
compatible = "hardkernel,odroid-c4", "amlogic,sm1";
- model = "Hardkernel ODROID-C4";
+ model = "Hardkernel ODROID-C4 - wanzl";
odroid-reboot {
compatible = "odroid,reboot";
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
index 76ad052fbf0c..00d41ed2bedb 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
@@ -328,8 +328,8 @@ &gpio {
"PIN_21", /* GPIOX_9 */
"PIN_24", /* GPIOX_10 */
"PIN_23", /* GPIOX_11 */
- "PIN_8", /* GPIOX_12 */
- "PIN_10", /* GPIOX_13 */
+ "",// "PIN_8", /* GPIOX_12 */
+ "",// "PIN_10", /* GPIOX_13 */
"PIN_29", /* GPIOX_14 */
"PIN_31", /* GPIOX_15 */
"PIN_12", /* GPIOX_16 */