(OSD3358-BAS) RTC device tree

Forums Devices (OSD3358-BAS) RTC device tree

Viewing 2 reply threads
  • Author
    Posts
    • #12974
      Jack Knightjakthree
      Participant

      Hi,

      OSD3358-BAS, Linux kernel 5.11.10.

      My custom board’s RTC is wired Use Case -1: RTC Enabled. My PMIC_IN_PWR_EN is connected to PMIC_POWER_EN.

      A snippet for the kernel’s device-tree bindings rtc-omap.txt file states

      Here is snippet from my device tree

      I am not sure which device tree I copied the ‘system-power-controller’ entry from but the entry is not in the &rtc section am335x-osd3358-sm-red.dts file. I understand the OSD-red board’s RTC is also wired use case-1; Based upon use case-1 wiring, I don’t think the RTC is controlling the system power.

      My question is, do I leave or remove the ‘system-power-controller’ entry from the &rtc section of my device tree?

      Thank you,

       

    • #12975
      Aedan Cullen
      Participant

      (First, I note that the PMIC_IN_PWR_EN pin on the OSD3358 corresponds to the PWR_EN pin in the TPS65217 datasheet. PMIC_POWER_EN is an output from the AM3358 RTC block, and does keep the same name as in the AM335x datasheet. Maybe we need a standard naming convention for SiP pins…)

      PMIC_POWER_EN is always driven high by the RTC block after VDDS_RTC comes up (which is powered by the always-on LDO1 output, called SYS_RTC_1P8V on the OSD3358). Connecting it directly to the PWR_EN input of the PMIC thus starts the power-up sequence of all the other DCDCs and LDOs in the system as soon as the RTC has been powered.

      So you should have the system-power-controller entry, as in this use case it is indeed the RTC block in the processor that controls all the main supplies. Furthermore, to disable those supplies, the RTC can drive PWR_EN low for various power-down operations, such as the transition to OFF and SLEEP states of the PMIC (some of this is in drivers/rtc/rtc-omap.c.)

      In any case, at least in upstream Linux, am335x-osd3358-sm-red.dts does include system-power-controller.

    • #12976
      Jack Knightjakthree
      Participant

      Aedan,

      Thank you for your detailed explanation. I understand now that PMIC_POWER_EN is an output from the RTC and that the RTC does indeed control the system power. I have left the ‘system-power-controller’ entry in my device tree.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.