Skip to content

Commit 325c81e

Browse files
committed
Merge tag 'at91-fixes-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/fixes
AT91 fixes #2 for 5.15: - More fixes for AT91 platform power management code related to the introduction of sama7g5: - management of DDR3L regulator rails for sama7g5ek - loading of TLB on different cores - PIO controller slew-rate settings for sama7g5ek: be aligned with datasheet requirements. * tag 'at91-fixes-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama7g5ek: to not touch slew-rate for SDMMC pins ARM: dts: at91: sama7g5ek: use proper slew-rate settings for GMACs ARM: at91: pm: preload base address of controllers in tlb ARM: at91: pm: group constants and addresses loading ARM: dts: at91: sama7g5ek: add suspend voltage for ddr3l rail Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents dd6a2ed + dbe68bc commit 325c81e

File tree

2 files changed

+63
-15
lines changed

2 files changed

+63
-15
lines changed

arch/arm/boot/dts/at91-sama7g5ek.dts

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,13 @@
196196

197197
regulator-state-standby {
198198
regulator-on-in-suspend;
199+
regulator-suspend-microvolt = <1350000>;
199200
regulator-mode = <4>;
200201
};
201202

202203
regulator-state-mem {
203204
regulator-on-in-suspend;
205+
regulator-suspend-microvolt = <1350000>;
204206
regulator-mode = <4>;
205207
};
206208
};
@@ -353,7 +355,10 @@
353355
#address-cells = <1>;
354356
#size-cells = <0>;
355357
pinctrl-names = "default";
356-
pinctrl-0 = <&pinctrl_gmac0_default &pinctrl_gmac0_txck_default &pinctrl_gmac0_phy_irq>;
358+
pinctrl-0 = <&pinctrl_gmac0_default
359+
&pinctrl_gmac0_mdio_default
360+
&pinctrl_gmac0_txck_default
361+
&pinctrl_gmac0_phy_irq>;
357362
phy-mode = "rgmii-id";
358363
status = "okay";
359364

@@ -368,7 +373,9 @@
368373
#address-cells = <1>;
369374
#size-cells = <0>;
370375
pinctrl-names = "default";
371-
pinctrl-0 = <&pinctrl_gmac1_default &pinctrl_gmac1_phy_irq>;
376+
pinctrl-0 = <&pinctrl_gmac1_default
377+
&pinctrl_gmac1_mdio_default
378+
&pinctrl_gmac1_phy_irq>;
372379
phy-mode = "rmii";
373380
status = "okay";
374381

@@ -423,14 +430,20 @@
423430
<PIN_PA15__G0_TXEN>,
424431
<PIN_PA30__G0_RXCK>,
425432
<PIN_PA18__G0_RXDV>,
426-
<PIN_PA22__G0_MDC>,
427-
<PIN_PA23__G0_MDIO>,
428433
<PIN_PA25__G0_125CK>;
434+
slew-rate = <0>;
435+
bias-disable;
436+
};
437+
438+
pinctrl_gmac0_mdio_default: gmac0_mdio_default {
439+
pinmux = <PIN_PA22__G0_MDC>,
440+
<PIN_PA23__G0_MDIO>;
429441
bias-disable;
430442
};
431443

432444
pinctrl_gmac0_txck_default: gmac0_txck_default {
433445
pinmux = <PIN_PA24__G0_TXCK>;
446+
slew-rate = <0>;
434447
bias-pull-up;
435448
};
436449

@@ -447,8 +460,13 @@
447460
<PIN_PD25__G1_RX0>,
448461
<PIN_PD26__G1_RX1>,
449462
<PIN_PD27__G1_RXER>,
450-
<PIN_PD24__G1_RXDV>,
451-
<PIN_PD28__G1_MDC>,
463+
<PIN_PD24__G1_RXDV>;
464+
slew-rate = <0>;
465+
bias-disable;
466+
};
467+
468+
pinctrl_gmac1_mdio_default: gmac1_mdio_default {
469+
pinmux = <PIN_PD28__G1_MDC>,
452470
<PIN_PD29__G1_MDIO>;
453471
bias-disable;
454472
};
@@ -540,13 +558,15 @@
540558
<PIN_PA8__SDMMC0_DAT5>,
541559
<PIN_PA9__SDMMC0_DAT6>,
542560
<PIN_PA10__SDMMC0_DAT7>;
561+
slew-rate = <0>;
543562
bias-pull-up;
544563
};
545564

546565
ck_cd_rstn_vddsel {
547566
pinmux = <PIN_PA0__SDMMC0_CK>,
548567
<PIN_PA2__SDMMC0_RSTN>,
549568
<PIN_PA11__SDMMC0_DS>;
569+
slew-rate = <0>;
550570
bias-pull-up;
551571
};
552572
};
@@ -558,6 +578,7 @@
558578
<PIN_PC0__SDMMC1_DAT1>,
559579
<PIN_PC1__SDMMC1_DAT2>,
560580
<PIN_PC2__SDMMC1_DAT3>;
581+
slew-rate = <0>;
561582
bias-pull-up;
562583
};
563584

@@ -566,6 +587,7 @@
566587
<PIN_PB28__SDMMC1_RSTN>,
567588
<PIN_PC5__SDMMC1_1V8SEL>,
568589
<PIN_PC4__SDMMC1_CD>;
590+
slew-rate = <0>;
569591
bias-pull-up;
570592
};
571593
};
@@ -577,11 +599,13 @@
577599
<PIN_PD6__SDMMC2_DAT1>,
578600
<PIN_PD7__SDMMC2_DAT2>,
579601
<PIN_PD8__SDMMC2_DAT3>;
602+
slew-rate = <0>;
580603
bias-pull-up;
581604
};
582605

583606
ck {
584607
pinmux = <PIN_PD4__SDMMC2_CK>;
608+
slew-rate = <0>;
585609
bias-pull-up;
586610
};
587611
};

arch/arm/mach-at91/pm_suspend.S

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,31 +1014,55 @@ ENTRY(at91_pm_suspend_in_sram)
10141014
mov tmp1, #0
10151015
mcr p15, 0, tmp1, c7, c10, 4
10161016

1017+
/* Flush tlb. */
1018+
mov r4, #0
1019+
mcr p15, 0, r4, c8, c7, 0
1020+
1021+
ldr tmp1, [r0, #PM_DATA_PMC_MCKR_OFFSET]
1022+
str tmp1, .mckr_offset
1023+
ldr tmp1, [r0, #PM_DATA_PMC_VERSION]
1024+
str tmp1, .pmc_version
1025+
ldr tmp1, [r0, #PM_DATA_MEMCTRL]
1026+
str tmp1, .memtype
1027+
ldr tmp1, [r0, #PM_DATA_MODE]
1028+
str tmp1, .pm_mode
1029+
1030+
/*
1031+
* ldrne below are here to preload their address in the TLB as access
1032+
* to RAM may be limited while in self-refresh.
1033+
*/
10171034
ldr tmp1, [r0, #PM_DATA_PMC]
10181035
str tmp1, .pmc_base
1036+
cmp tmp1, #0
1037+
ldrne tmp2, [tmp1, #0]
1038+
10191039
ldr tmp1, [r0, #PM_DATA_RAMC0]
10201040
str tmp1, .sramc_base
1041+
cmp tmp1, #0
1042+
ldrne tmp2, [tmp1, #0]
1043+
10211044
ldr tmp1, [r0, #PM_DATA_RAMC1]
10221045
str tmp1, .sramc1_base
1046+
cmp tmp1, #0
1047+
ldrne tmp2, [tmp1, #0]
1048+
1049+
#ifndef CONFIG_SOC_SAM_V4_V5
1050+
/* ldrne below are here to preload their address in the TLB */
10231051
ldr tmp1, [r0, #PM_DATA_RAMC_PHY]
10241052
str tmp1, .sramc_phy_base
1025-
ldr tmp1, [r0, #PM_DATA_MEMCTRL]
1026-
str tmp1, .memtype
1027-
ldr tmp1, [r0, #PM_DATA_MODE]
1028-
str tmp1, .pm_mode
1029-
ldr tmp1, [r0, #PM_DATA_PMC_MCKR_OFFSET]
1030-
str tmp1, .mckr_offset
1031-
ldr tmp1, [r0, #PM_DATA_PMC_VERSION]
1032-
str tmp1, .pmc_version
1033-
/* Both ldrne below are here to preload their address in the TLB */
1053+
cmp tmp1, #0
1054+
ldrne tmp2, [tmp1, #0]
1055+
10341056
ldr tmp1, [r0, #PM_DATA_SHDWC]
10351057
str tmp1, .shdwc
10361058
cmp tmp1, #0
10371059
ldrne tmp2, [tmp1, #0]
1060+
10381061
ldr tmp1, [r0, #PM_DATA_SFRBU]
10391062
str tmp1, .sfrbu
10401063
cmp tmp1, #0
10411064
ldrne tmp2, [tmp1, #0x10]
1065+
#endif
10421066

10431067
/* Active the self-refresh mode */
10441068
at91_sramc_self_refresh_ena

0 commit comments

Comments
 (0)