Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions arch/arm64/boot/dts/apple/spi1-nvram.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Common config for Apple's nvram using a SPI nor flash. This is common on all
* M1 and M2 devices. identically set up identically on all M1 and M2 devicesspi1, spinor and nvram config identical on all devices
*
* Copyright The Asahi Linux Contributors
*/

&spi1 {
status = "okay";

flash@0 {
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <25000000>;
#address-cells = <1>;
#size-cells = <1>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

nvram: partition@700000 {
label = "nvram";
/* To be filled by the loader */
reg = <0x0 0x0>;
status = "disabled";
};
};
};
};
26 changes: 3 additions & 23 deletions arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
dcp = &dcp;
disp0 = &display;
disp0_piodma = &disp0_piodma;
nvram = &nvram;
serial0 = &serial0;
wifi0 = &wifi0;
};
Expand Down Expand Up @@ -263,29 +264,6 @@
clock-frequency = <1068000000>;
};

&spi1 {
status = "okay";

flash@0 {
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <25000000>;
#address-cells = <1>;
#size-cells = <1>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

nvram: partition@700000 {
label = "nvram";
reg = <0x700000 0x20000>;
};
};
};
};

#ifndef NO_SPI_TRACKPAD
&spi3 {
status = "okay";
Expand Down Expand Up @@ -459,3 +437,5 @@
};
};
};

#include "spi1-nvram.dtsi"
3 changes: 3 additions & 0 deletions arch/arm64/boot/dts/apple/t600x-j375.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
disp0 = &display;
disp0_piodma = &disp0_piodma;
ethernet0 = &ethernet0;
nvram = &nvram;
serial0 = &serial0;
wifi0 = &wifi0;
};
Expand Down Expand Up @@ -397,3 +398,5 @@
apple,ppm-kp = <0.355>;
};
#endif

#include "spi1-nvram.dtsi"
3 changes: 3 additions & 0 deletions arch/arm64/boot/dts/apple/t6022-j180d.dts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
disp0_piodma = &disp0_piodma;
//ethernet0 = &ethernet0;
//ethernet1 = &ethernet1;
nvram = &nvram;
serial0 = &serial0;
//wifi0 = &wifi0;
};
Expand Down Expand Up @@ -573,3 +574,5 @@
apple,perf-boost-min-util = <75>;
apple,perf-tgt-utilization = <70>;
};

#include "spi1-nvram.dtsi"
5 changes: 0 additions & 5 deletions arch/arm64/boot/dts/apple/t602x-j414-j416.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
#define NO_SPI_TRACKPAD
#include "t600x-j314-j316.dtsi"

&nvram {
/* nvram is larger than on previous machines */
reg = <0x700000 0x100000>;
};

&hpm0 {
interrupts = <44 IRQ_TYPE_LEVEL_LOW>;
};
Expand Down
3 changes: 3 additions & 0 deletions arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
dcp = &dcp;
disp0 = &display;
disp0_piodma = &disp0_piodma;
nvram = &nvram;
serial0 = &serial0;
serial2 = &serial2;
wifi0 = &wifi0;
Expand Down Expand Up @@ -184,3 +185,5 @@
&nco_clkref {
clock-frequency = <900000000>;
};

#include "spi1-nvram.dtsi"
20 changes: 1 addition & 19 deletions arch/arm64/boot/dts/apple/t8103.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -725,25 +725,7 @@
power-domains = <&ps_spi1>;
#address-cells = <1>;
#size-cells = <0>;

flash@0 {
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <25000000>;
#address-cells = <1>;
#size-cells = <1>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

partition@700000 {
label = "nvram";
reg = <0x700000 0x20000>;
};
};
};
status = "disabled";
};

spi3: spi@23510c000 {
Expand Down
3 changes: 3 additions & 0 deletions arch/arm64/boot/dts/apple/t8112-jxxx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
dcp = &dcp;
disp0 = &display;
disp0_piodma = &disp0_piodma;
nvram = &nvram;
serial0 = &serial0;
serial2 = &serial2;
};
Expand Down Expand Up @@ -172,3 +173,5 @@
&nco_clkref {
clock-frequency = <900000000>;
};

#include "spi1-nvram.dtsi"
20 changes: 1 addition & 19 deletions arch/arm64/boot/dts/apple/t8112.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -729,25 +729,7 @@
power-domains = <&ps_spi1>;
#address-cells = <1>;
#size-cells = <0>;

flash@0 {
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <25000000>;
#address-cells = <1>;
#size-cells = <1>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

partition@700000 {
label = "nvram";
reg = <0x700000 0x20000>;
};
};
};
status = "disabled";
};

spi3: spi@23510c000 {
Expand Down