Thread (17 messages) 17 messages, 5 authors, 2020-08-30

Re: [PATCH v3 1/2] arm64: dts: meson-g12b-odroid-n2: Enable RTC controller node

From: Anand Moon <hidden>
Date: 2020-08-29 16:31:46
Also in: linux-amlogic, linux-devicetree

Hi All,

On Wed, 26 Aug 2020 at 12:29, Anand Moon [off-list ref] wrote:
hi Jerome

On Tue, 25 Aug 2020 at 20:00, Jerome Brunet [off-list ref] wrote:
quoted

On Tue 25 Aug 2020 at 11:01, Anand Moon [off-list ref] wrote:
quoted
Hi Jerome

On Mon, 24 Aug 2020 at 20:00, Jerome Brunet [off-list ref] wrote:
quoted

On Mon 24 Aug 2020 at 15:50, Neil Armstrong [off-list ref] wrote:
quoted
On 24/08/2020 15:41, Anand Moon wrote:
quoted
hi All,

On Fri, 21 Aug 2020 at 10:13, Anand Moon [off-list ref] wrote:
quoted
Hi Kevin,

Thanks for your review comments.

On Fri, 21 Aug 2020 at 01:03, Kevin Hilman [off-list ref] wrote:
quoted
Anand Moon [off-list ref] writes:
quoted
Enable RTC PCF8563 node on Odroid-N2 SBC, In order to
support the RTC wakealarm feature for suspend and resume.
Also assign an alias to the pcf8563 to rtc0 and meson-vrtc to rtc1
timer device to prevent it being assigned to /dev/rtc0
which disto userspace tools assume is a clock device.

Cc: Neil Armstrong <redacted>
Cc: Kevin Hilman <khilman@baylibre.com>
Suggested-by: Christian Hewitt <redacted>
Signed-off-by: Anand Moon <redacted>
---
Changes V3
--Drop the INI GPIOAO.BIT7 pinctrl.
Why did you drop this GPIO?  Isn't this the GPIO that the RTC uses to
wakeup the system?  If so, this should be included as part of this
patch.

It probably still works because the bootloader configures this GPIO as
input, but the kernel should not rely on the booloader for that, so
please include as part of this patch.
Ok I will figure out the correct pinctrl need for this settings.
looking into the Odroid N2 schematics.
I am trying to map the RTC INT pinctrl, ie RTC INT GPIOAO.BIT7.

Simply add:

interrupt-parent = <&gpio_intc>;
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;

to reflect the interrupt connection.
I have tried this setting, but it is not working.

[alarm@archl-on2e ~]$ dmesg| grep rtc
[    5.378002] meson-vrtc ff8000a8.rtc: registered as rtc1
[    5.942307] rtc-pcf8563 0-0051: pcf8563_write_block_data: err=-110
addr=0e, data=03
[    5.942316] rtc-pcf8563 0-0051: pcf8563_probe: write error
[    5.945983] rtc-pcf8563: probe of 0-0051 failed with error -5
-110 is timeout ... either you i2c bus is broken and you device is not
at 0x51. In both case, it has nothing to do with the interrupt configuration
I have check the I2C bus on the device for rtc and it return correctly.

$ sudo i2cdetect -l
i2c-1   i2c             DesignWare HDMI                         I2C adapter
i2c-0   i2c             Meson I2C adapter                       I2C adapter
$
$ sudo i2cdetect -y -r 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
quoted
quoted
quoted
quoted
No need to setup pinctrl here since the GPIO input is always connected
to the gpio irq generator whatever pinctrl mode is set.
It is actually better to setup pinctrl. Yes the irq controller can work
whatever the pin setup but if an output function is active it can mess with
what the irq controller gets.

Think about applying/removing bias if necessary too.
Ok, I am trying to add a new pinctrl configuration for
TSIN_A_DIN0 //  TDMB_FS // TDMB_SLV_FS
But it's still not working at my end.
Either you are quite confused when it comes to pinctrl or I am.
Basically I dont want to keep repeating silly mistakes.
quoted
TSIN and TDM have nothing to do with an i2c RTC.
Yes I understand this clearly, that's why I have dropped the
RTC INT gpio pinctrl settings.Without this setting RTC driver
works fine and their is no issue rtcwakeup during suspend
and resume in my testing.
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.

[0] https://pastebin.com/F2UA665H

-Best Regards
Anand

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help