aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi
blob: c7b7ea7b90a4c5d76e3ea944345b13688f51e70d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#include "mt7620a.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
	compatible = "lenovo,newifi-y1", "ralink,mt7620a-soc";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	keys {
		compatible = "gpio-keys";

		reset {
			label = "reset";
			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RESTART>;
		};
	};
};

&gpio2 {
	status = "okay";
};

&gpio3 {
	status = "okay";
};

&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 = "firmware";
				reg = <0x50000 0xfb0000>;
			};
		};
	};
};

&ehci {
	status = "okay";
};

&ohci {
	status = "okay";
};

&pcie {
	status = "okay";
};

&pcie0 {
	mt76@0,0 {
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&factory 0x8000>;
		ieee80211-freq-limit = <5000000 6000000>;
	};
};

&wmac {
	ralink,mtd-eeprom = <&factory 0x0>;
	pinctrl-names = "default";
	pinctrl-0 = <&pa_pins>;
};

&state_default {
	gpio {
		groups = "uartf", "wled", "nd_sd";
		function = "gpio";
	};
};
class="p">); if ( err ) { microcode_fini_cpu(cpu); return err; } if ( microcode_ops->microcode_resume_match(cpu, &nsig) ) { return microcode_ops->apply_microcode(cpu); } else { microcode_fini_cpu(cpu); return -EIO; } } static int microcode_update_cpu(const void *buf, size_t size) { int err; unsigned int cpu = smp_processor_id(); struct ucode_cpu_info *uci = ucode_cpu_info + cpu; spin_lock(&microcode_mutex); err = microcode_ops->collect_cpu_info(cpu, &uci->cpu_sig); if ( likely(!err) ) err = microcode_ops->cpu_request_microcode(cpu, buf, size); else __microcode_fini_cpu(cpu); spin_unlock(&microcode_mutex); return err; } static long do_microcode_update(void *_info) { struct microcode_info *info = _info; int error; BUG_ON(info->cpu != smp_processor_id()); error = microcode_update_cpu(info->buffer, info->buffer_size); if ( error ) info->error = error; info->cpu = next_cpu(info->cpu, cpu_online_map); if ( info->cpu < NR_CPUS ) return continue_hypercall_on_cpu(info->cpu, do_microcode_update, info); error = info->error; xfree(info); return error; } int microcode_update(XEN_GUEST_HANDLE(const_void) buf, unsigned long len) { int ret; struct microcode_info *info; if ( len != (uint32_t)len ) return -E2BIG; if ( microcode_ops == NULL ) return -EINVAL; info = xmalloc_bytes(sizeof(*info) + len); if ( info == NULL ) return -ENOMEM; ret = copy_from_guest(info->buffer, buf, len); if ( ret != 0 ) { xfree(info); return ret; } info->buffer_size = len; info->error = 0; info->cpu = first_cpu(cpu_online_map); return continue_hypercall_on_cpu(info->cpu, do_microcode_update, info); }