r38026 change the gpio initial node to pinctrl. I want to enable uartf for
HLK-RM04 device, so i add a "uartf_pins: uartf" node to the pinctrl node.
+ uartf_pins: uartf {
+ uartf {
+ ralink,group = "uartf";
+ ralink,function = "gpio uartf";
+ };
+ };
This node can enable uartf function of RT5350, but after add this node i
can't export gpio in the command line.

root@OpenWrt:/sys/class/gpio# echo 1 > export
[ 1056.700000] rt2880-pinmux pinctrl.1: pin 1 is not set to gpio mux
[ 1056.720000] rt2880-pinmux pinctrl.1: request() failed for pin 1
[ 1056.730000] rt2880-pinmux pinctrl.1: pin-1 (pio:1) status -22
ash: write error: Invalid argument

I am suspecting if the dts file of mine is wrong.

Index: target/linux/ramips/dts/HLKRM04.dts
===================================================================
--- target/linux/ramips/dts/HLKRM04.dts (revision 0)
+++ target/linux/ramips/dts/HLKRM04.dts (working copy)
@@ -0,0 +1,101 @@
+/dts-v1/;
+
+/include/ "rt5350.dtsi"
+
+/ {
+ compatible = "HLKRM04", "ralink,rt5350-soc";
+ model = "HILINK HLK-RM04";
+
+ palmbus@10000000 {
+ spi@b00 {
+ status = "okay";
+ m25p80@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "s25fl064k";
+ reg = <0 0>;
+ linux,modalias = "m25p80", "s25fl064k";
+ spi-max-frequency = <10000000>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "firmware";
+ reg = <0x50000 0xFb0000>;
+ };
+ };
+ };
+
+ uartlite@c00 {
+ status = "okay";
+ };
+
+ uart@500 {
+ status = "okay";
+ };
+ };
+
+ pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "i2c", "jtag", "rgmii", "mdio";
+ ralink,function = "gpio";
+ };
+ };
+
+ uartf_pins: uartf {
+ uartf {
+ ralink,group = "uartf";
+ ralink,function = "gpio uartf";
+ };
+ };
+ };
+
+ esw@10110000 {
+ status = "okay";
+ };
+
+ ehci@101c0000 {
+ status = "okay";
+ };
+
+ ohci@101c1000 {
+ status = "okay";
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+ wps {
+ label = "reset";
+ gpios = <&gpio0 14 1>;
+ linux,code = <0x198>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+ power {
+ label = "hlk-rm04:red:power";
+ gpios = <&gpio0 0 1>;
+ };
+ };
+};
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to