// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+#include "ar9344.dtsi"
+
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
-#include "ar9344.dtsi"
-
/ {
keys {
compatible = "gpio-keys";
/* default for ar934x, except for 1000M */
pll-data = <0x06000000 0x00000101 0x00001616>;
+ nvmem-cells = <&macaddr_lan 0>;
+ nvmem-cell-names = "mac-address";
+
phy-mode = "rgmii";
phy-handle = <&phy0>;
};
&mdio0 {
status = "okay";
- phy-mask = <0>;
-
phy0: ethernet-phy@0 {
reg = <0>;
qca,ar8327-initvals = <
ath9k: wifi@0,0 {
compatible = "pci168c,0030";
reg = <0x0000 0 0 0 0>;
- qca,no-eeprom;
+ /* "mac-address" currently does not work for
+ ath9k pci devices. these below are retained for future
+ improvements. */
+ /* nvmem-cells = <&macaddr_wan 1>, <&cal_art_5000>;
+ nvmem-cell-names = "mac-address", "calibration";
+ */
+ qca,no-eeprom; /* remove this when "mac-address" works */
gpio-controller;
#gpio-cells = <2>;
};
&spi {
status = "okay";
- num-cs = <1>;
flash@0 {
compatible = "jedec,spi-nor";
read-only;
};
- partition@fe0000 {
+ mac: partition@fe0000 {
label = "mac";
reg = <0xfe0000 0x010000>;
read-only;
+
+ compatible = "nvmem-cells";
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_lan: macaddr@4 {
+ compatible = "mac-base";
+ reg = <0x4 0x11>;
+ #nvmem-cell-cells = <1>;
+ };
+
+ macaddr_wan: macaddr@18 {
+ compatible = "mac-base";
+ reg = <0x18 0x11>;
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
- partition@ff0000 {
+ art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
+
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_1000: cal@1000 {
+ reg = <0x1000 0x440>;
+ };
+
+ cal_art_5000: cal@5000 {
+ reg = <0x5000 0x440>;
+ };
};
};
};
};
-&uart {
- status = "okay";
-};
-
&usb {
status = "okay";
- #address-cells = <1>;
- #size-cells = <0>;
-
- hub_port1: port@1 {
- reg = <1>;
- #trigger-source-cells = <0>;
- };
};
&usb_phy {
&wmac {
status = "okay";
- qca,no-eeprom;
+ nvmem-cells = <&macaddr_lan 0>, <&cal_art_1000>;
+ nvmem-cell-names = "mac-address", "calibration";
};