Hi Martin, On Sun, 30 Aug 2020 at 01:26, Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx> wrote: > > Hi Anand > > (I haven't re-read all of this discussion, so apologies if something > in my reply doesn't make sense) > > On Sat, Aug 29, 2020 at 6:31 PM Anand Moon <linux.amoon@xxxxxxxxx> wrote: > [...] > > Just want to clear my confusion on RTC INT gpio setting is not needed. > > I did not find any other example to support this changes. > > So I have enable the debug logs on rtc-pcf8563.c with this current > > patch at my end. > my understanding is that your testing procedure is to simply use your > original patch and see if rtc wake-up is working. > since GPIOAO_7 is not explicitly mentioned in your testing procedure > I'm assuming that you're not configuring it anywhere. Yes... > Kevin's concern is what happens when that GPIO is configured > incorrectly (for example by some u-boot bug, firmware issue, ...). for > example: have you tried to configure GPIOAO_7 in u-boot as output low > pin and see if rtc wake-up is still working? Yes I will check this later. Meanwhile I have checked this feature with _mainline u-boot_ and _odroid-n2 u-boot_ and the result is that rtc wakeup works. > > In your previous replies you mentioned various pin mux settings > related to TSIN_A_DIN0 // TDMB_FS // TDMB_SLV_FS > I don't know how those are related to the RTC > My suggestion is to look at > arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi - it has a > eth_phy_irq_pins definition and apply something similar on Odroid-N2 > Thanks for your suggestion, I have given this a try see below. But any new pinctrl setting leads to RTC probe failure. # dmesg | grep rtc [ 5.308536] meson-vrtc ff8000a8.rtc: registered as rtc1 [ 5.483978] rtc-pcf8563 0-0051: pcf8563_probe [ 5.487549] rtc-pcf8563 0-0051: pcf8563_write_block_data: err=-6 addr=0e, data=03 [ 5.490116] rtc-pcf8563 0-0051: pcf8563_probe: write error [ 5.552763] rtc-pcf8563: probe of 0-0051 failed with error -5 ------------------&------------------------------------ $ git diff arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts index 35a31cf181e2..dad54f8a947f 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts @@ -206,6 +206,15 @@ vddao_3v3: regulator-vddao_3v3 { regulator-always-on; }; + /* Make sure the rtc irq pin is properly configured as input */ + rtc_irq_pins: rtc-pin-irq { + mux { + groups = "GPIOAO_7"; + function = "gpio_periphs"; + bias-disable; + }; + }; + hdmi-connector { compatible = "hdmi-connector"; type = "a"; @@ -481,7 +490,8 @@ hdmi_tx_tmds_out: endpoint { &i2c3 { pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; - pinctrl-names = "default"; + pinctrl-1 = <&rtc_irq_pins>; + pinctrl-names = "default", "gpio_periphs"; status = "okay"; rtc0: rtc@51 { -Anand