Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ properties:
- enum:
- apple,t6050-pmu-rtc
- apple,t8132-pmu-rtc
- apple,t8152-pmu-rtc
- const: apple,t6041-pmu-rtc
- items:
- enum:
Expand Down
26 changes: 25 additions & 1 deletion arch/arm64/boot/dts/apple/t8152-j873g.dts
Original file line number Diff line number Diff line change
Expand Up @@ -429,22 +429,40 @@
nub_spmi0: spmi@308714000 {
/*
* Gen 4: FIFO registers at 0x200 (the block is 0x4000
* long); polled, so no interrupts are described yet.
* long); AIC IRQ 675 per the J873g ADT.
*/
compatible = "apple,t8152-spmi", "apple,t8142-spmi";
reg = <0x3 0x08714000 0x0 0x4000>;
#address-cells = <2>;
#size-cells = <0>;
#interrupt-cells = <2>;
interrupt-controller;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 675 IRQ_TYPE_LEVEL_HIGH>;

pmic@e {
compatible = "apple,woodcote-pmic", "apple,spmi-nvmem";
reg = <0xe SPMI_USID>;

pmu_rtc: rtc {
compatible = "apple,t8152-pmu-rtc", "apple,t6041-pmu-rtc";
interrupt-parent = <&nub_spmi0>;
interrupts = <2 IRQ_TYPE_EDGE_RISING>;
nvmem-cells = <&rtc_offset>;
nvmem-cell-names = "rtc_offset";
wakeup-source;
};

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

/* ADT info-rtc_scrpad: 48-bit offset in 32768 Hz ticks. */
rtc_offset: rtc-offset@2100 {
reg = <0x2100 0x6>;
};

boot_stage: boot-stage@f801 {
reg = <0xf801 0x1>;
};
Expand Down Expand Up @@ -501,6 +519,12 @@
"boot_error_count", "panic_count";
};

rtc {
compatible = "apple,smc-rtc";
nvmem-cells = <&rtc_offset>;
nvmem-cell-names = "rtc_offset";
};

m6_smc_hwmon: hwmon {
compatible = "apple,smc-hwmon";
#thermal-sensor-cells = <1>;
Expand Down
6 changes: 4 additions & 2 deletions drivers/mfd/macsmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,15 @@ static int apple_smc_add_described_devices(struct apple_smc *smc, const struct m

/*
* T8152: temperatures and fans (hwmon; the fan keys are read-only unless the
* unsafe fan_control parameter is set) and power off/restart (reboot, which
* only writes the MBSE key). Notifications, GPIO and the power supply are not
* unsafe fan_control parameter is set), power off/restart (reboot, which only
* writes the MBSE key), and the wall clock (rtc, which reads CLKT and the
* PMU rtc_offset cell). Notifications, GPIO and the power supply are not
* qualified there yet.
*/
static const struct mfd_cell apple_smc_telemetry_devs[] = {
MFD_CELL_OF("macsmc-hwmon", NULL, NULL, 0, 0, "apple,smc-hwmon"),
MFD_CELL_OF("macsmc-reboot", NULL, NULL, 0, 0, "apple,smc-reboot"),
MFD_CELL_OF("macsmc-rtc", NULL, NULL, 0, 0, "apple,smc-rtc"),
};

static void apple_smc_read_sram(struct apple_smc *smc, void *buf, size_t size)
Expand Down
3 changes: 2 additions & 1 deletion drivers/nvmem/apple-spmi-nvmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ static int apple_spmi_nvmem_probe(struct spmi_device *sdev)
!of_device_is_compatible(sdev->dev.of_node, "apple,chapel-pmic") &&
!of_device_is_compatible(sdev->dev.of_node, "apple,maverick-pmic") &&
!of_device_is_compatible(sdev->dev.of_node, "apple,stowe-pmic") &&
!of_device_is_compatible(sdev->dev.of_node, "apple,sera-pmic"))
!of_device_is_compatible(sdev->dev.of_node, "apple,sera-pmic") &&
!of_device_is_compatible(sdev->dev.of_node, "apple,woodcote-pmic"))
return 0;

return devm_of_platform_populate(&sdev->dev);
Expand Down
Loading