From 07e324d4dfef7b9df22c950055636b9d0b890af4 Mon Sep 17 00:00:00 2001 From: Codrin Ciubotariu Date: Mon, 15 Jun 2020 12:55:23 +0300 Subject: [PATCH 1/6] ARM: dts: at91: sama5d2_xplained: classd: pull-down the R1 and R3 lines The R1 and R3 lines drive NMOS transistors that are OFF with a low level. On the SAMA5D2 Xplained board, if the pins corresponding to R1 and R3 have pull-ups enabled, there is an extra 2 x 30uA power consumption. Use pull-downs for these 2 lines to remove the unnecessary power consumption. Fixes: b133ca7a653c ("ARM: dts: at91: sama5d2_xplained: add pin muxing and enable classd") Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200615095525.43414-1-codrin.ciubotariu@microchip.com --- arch/arm/boot/dts/at91-sama5d2_xplained.dts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts index a927165ea7c2..0e17df568d0b 100644 --- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts +++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts @@ -490,14 +490,18 @@ bias-pull-up; }; - pinctrl_classd_default: classd_default { + pinctrl_classd_default_pfets: classd_default_pfets { pinmux = , - , - , - ; + ; bias-pull-up; }; + pinctrl_classd_default_nfets: classd_default_nfets { + pinmux = , + ; + bias-pull-down; + }; + pinctrl_flx0_default: flx0_default { pinmux = , ; @@ -696,7 +700,7 @@ classd: classd@fc048000 { pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_classd_default>; + pinctrl-0 = <&pinctrl_classd_default_pfets &pinctrl_classd_default_nfets>; atmel,pwm-type = "diff"; atmel,non-overlap-time = <10>; status = "okay"; From 008e6fad765e684dc5c828693b7d8014524ec08b Mon Sep 17 00:00:00 2001 From: Codrin Ciubotariu Date: Mon, 15 Jun 2020 12:55:24 +0300 Subject: [PATCH 2/6] ARM: dts: at91: sam9x60ek: classd: pull-down the L1 and L3 lines The L1 and L3 lines drive NMOS transistors that are OFF with a low level. On the SAM9X60 EK board, if the pins corresponding to L1 and L3 have pull-ups enabled, there is an extra 2 x 30uA power consumption. Use pull-downs for these 2 lines to remove the unnecessary power consumption. Fixes: 1e5f532c2737 ("ARM: dts: at91: sam9x60: add device tree for soc and board") Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200615095525.43414-2-codrin.ciubotariu@microchip.com --- arch/arm/boot/dts/at91-sam9x60ek.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-sam9x60ek.dts index a5f5718c711a..8652dbbae5be 100644 --- a/arch/arm/boot/dts/at91-sam9x60ek.dts +++ b/arch/arm/boot/dts/at91-sam9x60ek.dts @@ -470,9 +470,9 @@ pinctrl_classd_default: classd { atmel,pins = ; + AT91_PIOA 27 AT91_PERIPH_C AT91_PINCTRL_PULL_DOWN>; }; }; From 73554069ded8fc6fa747423522c4295d5bbf6f52 Mon Sep 17 00:00:00 2001 From: Claudiu Beznea Date: Wed, 10 Jun 2020 12:05:35 +0300 Subject: [PATCH 3/6] dt-bindings: rtc: add microchip,sam9x60-rtt Add microchip,sam9x60-rtt to compatible list. Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni Acked-by: Rob Herring Link: https://lore.kernel.org/r/1591779936-18577-3-git-send-email-claudiu.beznea@microchip.com --- Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt index 6ae79d1843f3..3f0e2a5950eb 100644 --- a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt +++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt @@ -1,7 +1,9 @@ Atmel AT91SAM9260 Real Time Timer Required properties: -- compatible: should be: "atmel,at91sam9260-rtt" +- compatible: should be one of the following: + - "atmel,at91sam9260-rtt" + - "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt" - reg: should encode the memory region of the RTT controller - interrupts: rtt alarm/event interrupt - clocks: should contain the 32 KHz slow clk that will drive the RTT block. From 5f6b33f463468b9595eebfed142756ba13ea2b60 Mon Sep 17 00:00:00 2001 From: Claudiu Beznea Date: Wed, 10 Jun 2020 12:05:36 +0300 Subject: [PATCH 4/6] ARM: dts: sam9x60: add rtt Add RTT. Allong with it enable GBPR as it is requested by RTT. Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1591779936-18577-4-git-send-email-claudiu.beznea@microchip.com --- arch/arm/boot/dts/at91-sam9x60ek.dts | 9 +++++++++ arch/arm/boot/dts/sam9x60.dtsi | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-sam9x60ek.dts index 8652dbbae5be..ca15ff8fea18 100644 --- a/arch/arm/boot/dts/at91-sam9x60ek.dts +++ b/arch/arm/boot/dts/at91-sam9x60ek.dts @@ -309,6 +309,10 @@ }; }; +&gpbr { + status = "okay"; +}; + &i2s { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2s_default>; @@ -636,6 +640,11 @@ }; }; +&rtt { + atmel,rtt-rtc-time-reg = <&gpbr 0x0>; + status = "okay"; +}; + &shutdown_controller { atmel,shdwc-debouncer = <976>; status = "okay"; diff --git a/arch/arm/boot/dts/sam9x60.dtsi b/arch/arm/boot/dts/sam9x60.dtsi index 6763423d64b8..d10843da4a85 100644 --- a/arch/arm/boot/dts/sam9x60.dtsi +++ b/arch/arm/boot/dts/sam9x60.dtsi @@ -661,6 +661,13 @@ status = "disabled"; }; + rtt: rtt@fffffe20 { + compatible = "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt"; + reg = <0xfffffe20 0x20>; + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; + clocks = <&clk32k 0>; + }; + pit: timer@fffffe40 { compatible = "atmel,at91sam9260-pit"; reg = <0xfffffe40 0x10>; From 51139cc82c8d6edec034a6c2401090070195fa13 Mon Sep 17 00:00:00 2001 From: Codrin Ciubotariu Date: Thu, 18 Jun 2020 18:28:45 +0300 Subject: [PATCH 5/6] ARM: dts: at91: sama5d2_xplained: Remove pdmic node The PDMIC needs PDM microphones to work. sama5d2 xplained doesn't have such microphones, so there is no reason to enable PDMIC and take the pins since there is no-one using them. Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200618152845.682723-1-codrin.ciubotariu@microchip.com --- arch/arm/boot/dts/at91-sama5d2_xplained.dts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts index 0e17df568d0b..058fae1b4a76 100644 --- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts +++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts @@ -168,16 +168,6 @@ }; }; - pdmic@f8018000 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_pdmic_default>; - atmel,model = "PDMIC @ sama5d2_xplained"; - atmel,mic-min-freq = <1000000>; - atmel,mic-max-freq = <3246000>; - atmel,mic-offset = <0x0>; - status = "okay"; - }; - uart1: serial@f8020000 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1_default>; @@ -599,12 +589,6 @@ bias-disable; }; - pinctrl_pdmic_default: pdmic_default { - pinmux = , - ; - bias-disable; - }; - pinctrl_qspi0_default: qspi0_default { sck_cs { pinmux = , From 7dbf4bbf1c320d82058878bd44805724d171e1e8 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Sat, 18 Jul 2020 01:36:44 +0200 Subject: [PATCH 6/6] ARM: dts: at91: sama5d3_xplained: change phy-mode Since commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY"), networking is broken on sama5d3 xplained. The device tree has phy-mode = "rgmii" and this worked before, because KSZ9031 PHY started with default RGMII internal delays configuration (TX off, RX on 1.2 ns) and MAC provided TX delay. After above commit, the KSZ9031 PHY starts handling phy mode properly and disables RX delay, as result networking is become broken. Fix it by switching to phy-mode = "rgmii-rxid" to reflect previous behavior. Fixes: bcf3440c6dd78bfe ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200717233644.841080-1-alexandre.belloni@bootlin.com --- arch/arm/boot/dts/at91-sama5d3_xplained.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/at91-sama5d3_xplained.dts b/arch/arm/boot/dts/at91-sama5d3_xplained.dts index 61f068a7b362..7abf555cd2fe 100644 --- a/arch/arm/boot/dts/at91-sama5d3_xplained.dts +++ b/arch/arm/boot/dts/at91-sama5d3_xplained.dts @@ -128,7 +128,7 @@ }; macb0: ethernet@f0028000 { - phy-mode = "rgmii"; + phy-mode = "rgmii-rxid"; #address-cells = <1>; #size-cells = <0>; status = "okay";