ramips: add support for WiiMu A21
authorDavid Bauer <[email protected]>
Sat, 4 Dec 2021 19:59:08 +0000 (20:59 +0100)
committerDavid Bauer <[email protected]>
Mon, 3 Apr 2023 01:14:58 +0000 (03:14 +0200)
target/linux/ramips/dts/mt7620a.dtsi
target/linux/ramips/dts/mt7620a_wiimu_a21.dts [new file with mode: 0644]
target/linux/ramips/image/mt7620.mk

index 4b6fa60dc8b72ea8b89a5fae53b83c44f487b4e5..8cd43c3870027ccc940638383cfbe39e7fa4ca7e 100644 (file)
                        };
                };
 
+               uartf_i2s_pins: uartf_i2s {
+                       uartf_i2s {
+                               groups = "uartf";
+                               function = "i2s uartf";
+                       };
+               };
+
                uartf_gpio_pins: uartf_gpio {
                        uartf_gpio {
                                groups = "uartf";
diff --git a/target/linux/ramips/dts/mt7620a_wiimu_a21.dts b/target/linux/ramips/dts/mt7620a_wiimu_a21.dts
new file mode 100644 (file)
index 0000000..a73b22b
--- /dev/null
@@ -0,0 +1,113 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       compatible = "wiimu,a21", "ralink,mt7620a-soc";
+       model = "WiiMu A21";
+
+/*
+       sound {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "Audio-I2S";
+               simple-audio-card,format = "i2s";
+               simple-audio-card,bitclock-master = <&dailink0_master>;
+               simple-audio-card,frame-master = <&dailink0_master>;
+               simple-audio-card,widgets =
+                       "Headphone", "Headphones";
+               simple-audio-card,routing =
+                       "Headphones", "HP_L",
+                       "Headphones", "HP_R";
+               simple-audio-card,mclk-fs = <256>;
+
+               simple-audio-card,cpu {
+                       sound-dai = <&i2s>;
+               };
+
+               dailink0_master: simple-audio-card,codec {
+                       sound-dai = <&codec>;
+               };
+       };
+*/
+};
+
+&i2s {
+       #sound-dai-cells = <0>;
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&uartf_i2s_pins>;
+};
+
+&spi0 {
+       status = "okay";
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <10000000>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       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 {
+                               compatible = "denx,uimage";
+                               label = "kernel-back";
+                               reg = <0x50000 0x200000>;
+                               read-only;
+                       };
+
+                       partition@250000 {
+                               compatible = "denx,uimage";
+                               label = "firmware";
+                               reg = <0x250000 0x730000>;
+                       };
+
+                       partition@980000 {
+                               label = "user";
+                               reg = <0x980000 0x80000>;
+                               read-only;
+                       };
+
+                       partition@a00000 {
+                               label = "user2";
+                               reg = <0xa00000 0x80000>;
+                               read-only;
+                       };
+               };
+       };
+};
+
+&wmac {
+       ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_4: macaddr@4 {
+               reg = <0x4 0x6>;
+       };
+};
index de84b232c13aff93e9dfb0fdbdfd8c39abe7c375..ca7b09103d9cfcbb8797fc9c1159c375ce4fdafa 100644 (file)
@@ -1292,6 +1292,15 @@ define Device/wevo_air-duo
 endef
 TARGET_DEVICES += wevo_air-duo
 
+define Device/wiimu_a21
+  SOC := mt7620a
+  IMAGE_SIZE := 7744k
+  DEVICE_VENDOR := WiiMu
+  DEVICE_MODEL := A21
+  DEVICE_PACKAGES := kmod-sound-core kmod-sound-mt7620
+endef
+TARGET_DEVICES += wiimu_a21
+
 define Device/wrtnode_wrtnode
   SOC := mt7620n
   IMAGE_SIZE := 16064k