Message ID | 20231201110840.37408-7-biju.das.jz@bp.renesas.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | Add DA9062 PMIC and built-in RTC support for RZ/G2UL SMARC EVK | expand |
Hi Biju, On Fri, Dec 1, 2023 at 12:09 PM Biju Das <biju.das.jz@bp.renesas.com> wrote: > Enable the config for the Renesas DA9062 PMIC and RTC, as it is > populated on RZ/G2UL SMARC EVK. > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Thanks for your patch! LGTM, but I would have expected (at least) CONFIG_INPUT_DA9063_ONKEY=m too, cfr. my comments on patch 5/6. Gr{oetje,eeting}s, Geert
Hi Geert, Thanks for the feedback. > -----Original Message----- > From: Geert Uytterhoeven <geert@linux-m68k.org> > Sent: Friday, December 1, 2023 1:41 PM > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 defconfig > > Hi Biju, > > On Fri, Dec 1, 2023 at 12:09 PM Biju Das <biju.das.jz@bp.renesas.com> > wrote: > > Enable the config for the Renesas DA9062 PMIC and RTC, as it is > > populated on RZ/G2UL SMARC EVK. > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > Thanks for your patch! > > LGTM, but I would have expected (at least) > > CONFIG_INPUT_DA9063_ONKEY=m > > too, cfr. my comments on patch 5/6. I have tested this, but I get "da9063-onkey da9062-onkey: error -ENXIO: IRQ ONKEY not found" So, I won't be able to test onkey events. So plaaning to disable this node. Cheers, Biju > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux- > m68k.org > > In personal conversations with technical people, I call myself a hacker. > But when I'm talking to journalists I just say "programmer" or something > like that. > -- Linus Torvalds
Hi Biju, On Fri, Dec 1, 2023 at 4:02 PM Biju Das <biju.das.jz@bp.renesas.com> wrote: > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > On Fri, Dec 1, 2023 at 12:09 PM Biju Das <biju.das.jz@bp.renesas.com> > > wrote: > > > Enable the config for the Renesas DA9062 PMIC and RTC, as it is > > > populated on RZ/G2UL SMARC EVK. > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > > > Thanks for your patch! > > > > LGTM, but I would have expected (at least) > > > > CONFIG_INPUT_DA9063_ONKEY=m > > > > too, cfr. my comments on patch 5/6. > > I have tested this, but I get "da9063-onkey da9062-onkey: error -ENXIO: IRQ ONKEY not found" > So, I won't be able to test onkey events. So plaaning to disable this node. Indeed, currently drivers/input/misc/da9063_onkey.c requires an interrupt to function. I wonder if it can be made to work using a timer and pure polling... Gr{oetje,eeting}s, Geert
Hi Geert Uytterhoeven, Thanks for the feedback. > -----Original Message----- > From: Geert Uytterhoeven <geert@linux-m68k.org> > Sent: Friday, December 1, 2023 3:42 PM > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 defconfig > > Hi Biju, > > On Fri, Dec 1, 2023 at 4:02 PM Biju Das <biju.das.jz@bp.renesas.com> > wrote: > > > From: Geert Uytterhoeven <geert@linux-m68k.org> On Fri, Dec 1, 2023 > > > at 12:09 PM Biju Das <biju.das.jz@bp.renesas.com> > > > wrote: > > > > Enable the config for the Renesas DA9062 PMIC and RTC, as it is > > > > populated on RZ/G2UL SMARC EVK. > > > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > > > > > Thanks for your patch! > > > > > > LGTM, but I would have expected (at least) > > > > > > CONFIG_INPUT_DA9063_ONKEY=m > > > > > > too, cfr. my comments on patch 5/6. > > > > I have tested this, but I get "da9063-onkey da9062-onkey: error -ENXIO: > IRQ ONKEY not found" > > So, I won't be able to test onkey events. So plaaning to disable this > node. > > Indeed, currently drivers/input/misc/da9063_onkey.c requires an interrupt > to function. I wonder if it can be made to work using a timer and pure > polling... Yes, that is possible by either adding a debugfs to enable polling for testing. Or a device tree property for adding poll delay, so that one can have polling support to test onkey driver. Basically, on a production system we should avoid polling as it unnecessarily wakeup the system. Please share your thoughts on this. Cheers, Biju
Hi Biju, On Sun, Dec 10, 2023 at 10:50 AM Biju Das <biju.das.jz@bp.renesas.com> wrote: > > -----Original Message----- > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > Sent: Friday, December 1, 2023 3:42 PM > > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 defconfig > > > > On Fri, Dec 1, 2023 at 4:02 PM Biju Das <biju.das.jz@bp.renesas.com> > > wrote: > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> On Fri, Dec 1, 2023 > > > > at 12:09 PM Biju Das <biju.das.jz@bp.renesas.com> > > > > wrote: > > > > > Enable the config for the Renesas DA9062 PMIC and RTC, as it is > > > > > populated on RZ/G2UL SMARC EVK. > > > > > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > > > > > > > Thanks for your patch! > > > > > > > > LGTM, but I would have expected (at least) > > > > > > > > CONFIG_INPUT_DA9063_ONKEY=m > > > > > > > > too, cfr. my comments on patch 5/6. > > > > > > I have tested this, but I get "da9063-onkey da9062-onkey: error -ENXIO: > > IRQ ONKEY not found" > > > So, I won't be able to test onkey events. So plaaning to disable this > > node. > > > > Indeed, currently drivers/input/misc/da9063_onkey.c requires an interrupt > > to function. I wonder if it can be made to work using a timer and pure > > polling... > > Yes, that is possible by either adding a debugfs to enable polling for testing. > > Or > > a device tree property for adding poll delay, so that one can have polling support to test onkey driver. I would go for the latter, cfr. poll-interval in Documentation/devicetree/bindings/input/gpio-keys.yaml. > Basically, on a production system we should avoid polling as it unnecessarily wakeup the system. Wouldn't polling (by Linux) only happen when the system is already awake? I think the DA9063 itself handles the onkey when the system is asleep. Gr{oetje,eeting}s, Geert
Hi Geert, > -----Original Message----- > From: Geert Uytterhoeven <geert@linux-m68k.org> > Sent: Monday, December 11, 2023 8:20 AM > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 defconfig > > Hi Biju, > > On Sun, Dec 10, 2023 at 10:50 AM Biju Das <biju.das.jz@bp.renesas.com> > wrote: > > > -----Original Message----- > > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > > Sent: Friday, December 1, 2023 3:42 PM > > > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 > > > defconfig > > > > > > On Fri, Dec 1, 2023 at 4:02 PM Biju Das <biju.das.jz@bp.renesas.com> > > > wrote: > > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> On Fri, Dec 1, > > > > > 2023 at 12:09 PM Biju Das <biju.das.jz@bp.renesas.com> > > > > > wrote: > > > > > > Enable the config for the Renesas DA9062 PMIC and RTC, as it > > > > > > is populated on RZ/G2UL SMARC EVK. > > > > > > > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > > > > > > > > > Thanks for your patch! > > > > > > > > > > LGTM, but I would have expected (at least) > > > > > > > > > > CONFIG_INPUT_DA9063_ONKEY=m > > > > > > > > > > too, cfr. my comments on patch 5/6. > > > > > > > > I have tested this, but I get "da9063-onkey da9062-onkey: error - > ENXIO: > > > IRQ ONKEY not found" > > > > So, I won't be able to test onkey events. So plaaning to disable > > > > this > > > node. > > > > > > Indeed, currently drivers/input/misc/da9063_onkey.c requires an > > > interrupt to function. I wonder if it can be made to work using a > > > timer and pure polling... > > > > Yes, that is possible by either adding a debugfs to enable polling for > testing. > > > > Or > > > > a device tree property for adding poll delay, so that one can have > polling support to test onkey driver. > > I would go for the latter, cfr. poll-interval in > Documentation/devicetree/bindings/input/gpio-keys.yaml. > > > Basically, on a production system we should avoid polling as it > unnecessarily wakeup the system. > > Wouldn't polling (by Linux) only happen when the system is already awake? IIUC, That is an overhead. If there is no load, system goes to suspend mode and the timer for the polling (SCAN keys) will wakeup the system and same process repeats. If we have a PMIC IRQ, this won't happen. > I think the DA9063 itself handles the onkey when the system is asleep. I will ask HW person to wire IRQ on PMIC, so that I can check the behaviour. Cheers, Biju
Hi Biju, On Mon, Dec 11, 2023 at 9:32 AM Biju Das <biju.das.jz@bp.renesas.com> wrote: > > -----Original Message----- > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > Sent: Monday, December 11, 2023 8:20 AM > > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 defconfig > > > > On Sun, Dec 10, 2023 at 10:50 AM Biju Das <biju.das.jz@bp.renesas.com> > > wrote: > > > > -----Original Message----- > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > > > Sent: Friday, December 1, 2023 3:42 PM > > > > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 > > > > defconfig > > > > > > > > On Fri, Dec 1, 2023 at 4:02 PM Biju Das <biju.das.jz@bp.renesas.com> > > > > wrote: > > > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> On Fri, Dec 1, > > > > > > 2023 at 12:09 PM Biju Das <biju.das.jz@bp.renesas.com> > > > > > > wrote: > > > > > > > Enable the config for the Renesas DA9062 PMIC and RTC, as it > > > > > > > is populated on RZ/G2UL SMARC EVK. > > > > > > > > > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > > > > > > > > > > > Thanks for your patch! > > > > > > > > > > > > LGTM, but I would have expected (at least) > > > > > > > > > > > > CONFIG_INPUT_DA9063_ONKEY=m > > > > > > > > > > > > too, cfr. my comments on patch 5/6. > > > > > > > > > > I have tested this, but I get "da9063-onkey da9062-onkey: error - > > ENXIO: > > > > IRQ ONKEY not found" > > > > > So, I won't be able to test onkey events. So plaaning to disable > > > > > this > > > > node. > > > > > > > > Indeed, currently drivers/input/misc/da9063_onkey.c requires an > > > > interrupt to function. I wonder if it can be made to work using a > > > > timer and pure polling... > > > > > > Yes, that is possible by either adding a debugfs to enable polling for > > testing. > > > > > > Or > > > > > > a device tree property for adding poll delay, so that one can have > > polling support to test onkey driver. > > > > I would go for the latter, cfr. poll-interval in > > Documentation/devicetree/bindings/input/gpio-keys.yaml. > > > > > Basically, on a production system we should avoid polling as it > > unnecessarily wakeup the system. > > > > Wouldn't polling (by Linux) only happen when the system is already awake? > > IIUC, That is an overhead. If there is no load, system goes to suspend mode and > the timer for the polling (SCAN keys) will wakeup the system and same > process repeats. If we have a PMIC IRQ, this won't happen. Ah, you mean idle. Yes, that does incur a (small) overhead (I guess there are other timers running, too). I don't think any timer runs when the system is suspended. Gr{oetje,eeting}s, Geert
Hi Geert, > -----Original Message----- > From: Geert Uytterhoeven <geert@linux-m68k.org> > Sent: Monday, December 11, 2023 8:53 AM > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 defconfig > > Hi Biju, > > On Mon, Dec 11, 2023 at 9:32 AM Biju Das <biju.das.jz@bp.renesas.com> > wrote: > > > -----Original Message----- > > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > > Sent: Monday, December 11, 2023 8:20 AM > > > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 > > > defconfig > > > > > > On Sun, Dec 10, 2023 at 10:50 AM Biju Das > > > <biju.das.jz@bp.renesas.com> > > > wrote: > > > > > -----Original Message----- > > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > > > > Sent: Friday, December 1, 2023 3:42 PM > > > > > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 > > > > > defconfig > > > > > > > > > > On Fri, Dec 1, 2023 at 4:02 PM Biju Das > > > > > <biju.das.jz@bp.renesas.com> > > > > > wrote: > > > > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> On Fri, Dec > > > > > > > 1, > > > > > > > 2023 at 12:09 PM Biju Das <biju.das.jz@bp.renesas.com> > > > > > > > wrote: > > > > > > > > Enable the config for the Renesas DA9062 PMIC and RTC, as > > > > > > > > it is populated on RZ/G2UL SMARC EVK. > > > > > > > > > > > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > > > > > > > > > > > > > Thanks for your patch! > > > > > > > > > > > > > > LGTM, but I would have expected (at least) > > > > > > > > > > > > > > CONFIG_INPUT_DA9063_ONKEY=m > > > > > > > > > > > > > > too, cfr. my comments on patch 5/6. > > > > > > > > > > > > I have tested this, but I get "da9063-onkey da9062-onkey: > > > > > > error - > > > ENXIO: > > > > > IRQ ONKEY not found" > > > > > > So, I won't be able to test onkey events. So plaaning to > > > > > > disable this > > > > > node. > > > > > > > > > > Indeed, currently drivers/input/misc/da9063_onkey.c requires an > > > > > interrupt to function. I wonder if it can be made to work using > > > > > a timer and pure polling... > > > > > > > > Yes, that is possible by either adding a debugfs to enable polling > > > > for > > > testing. > > > > > > > > Or > > > > > > > > a device tree property for adding poll delay, so that one can have > > > polling support to test onkey driver. > > > > > > I would go for the latter, cfr. poll-interval in > > > Documentation/devicetree/bindings/input/gpio-keys.yaml. > > > > > > > Basically, on a production system we should avoid polling as it > > > unnecessarily wakeup the system. > > > > > > Wouldn't polling (by Linux) only happen when the system is already > awake? > > > > IIUC, That is an overhead. If there is no load, system goes to suspend > > mode and the timer for the polling (SCAN keys) will wakeup the system > > and same process repeats. If we have a PMIC IRQ, this won't happen. > > Ah, you mean idle. Yes, that does incur a (small) overhead (I guess there > are other timers running, too). Yes. > I don't think any timer runs when the system is suspended. I guess, If we are controlling PM through CPU idle states, this will have an effect. We schedule timers for poll intervals from onkey driver, when it expires it will wakeup the system and again based on idle state, it enters into some retention state and goes on. Cheers, BIju
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 5ad2b841aafc..b68b122d1b1e 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -714,6 +714,7 @@ CONFIG_MFD_ALTERA_SYSMGR=y CONFIG_MFD_BD9571MWV=y CONFIG_MFD_AXP20X_I2C=y CONFIG_MFD_AXP20X_RSB=y +CONFIG_MFD_DA9062=y CONFIG_MFD_EXYNOS_LPASS=m CONFIG_MFD_HI6421_PMIC=y CONFIG_MFD_HI655X_PMIC=y @@ -1130,6 +1131,7 @@ CONFIG_RTC_DRV_RV8803=m CONFIG_RTC_DRV_S5M=y CONFIG_RTC_DRV_DS3232=y CONFIG_RTC_DRV_PCF2127=m +CONFIG_RTC_DRV_DA9063=m CONFIG_RTC_DRV_EFI=y CONFIG_RTC_DRV_CROS_EC=y CONFIG_RTC_DRV_FSL_FTM_ALARM=m
Enable the config for the Renesas DA9062 PMIC and RTC, as it is populated on RZ/G2UL SMARC EVK. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> --- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+)