public inbox for sophgo@lists.linux.dev
 help / color / mirror / Atom feed
* Hardware clock on the Pioneer
@ 2025-12-30 22:56 Michael Orlitzky
  2026-01-05  0:38 ` Chen Wang
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Orlitzky @ 2025-12-30 22:56 UTC (permalink / raw)
  To: sophgo

Hello, I finally have the upstream kernel running on my Pioneer Box,
and I notice that the hardware clock is not enabled. I've patched this
in my own kernel (sg2042-milkv-pioneer.dts) by enabling i2c0, defining
the RTC,

  &i2c0 {
    pinctrl-0 = <&i2c0_cfg>;
    pinctrl-names = "default";
    status = "okay";

      rtc: rtc@68 {
        compatible = "dallas,ds1307";
        reg = <0x68>;
    };
  };

and copying the pinctrl bits from i2c1:

  i2c0_cfg: i2c0-cfg {
    i2c0-pins {
      pinmux = <PINMUX(PIN_IIC0_SDA, 0)>,
               <PINMUX(PIN_IIC0_SCL, 0)>;
      bias-pull-up;
      drive-strength-microamp = <26800>;
      input-schmitt-enable;
    };
  };

It seems to work:

  $ sudo hwclock --show
  2025-12-30 17:54:05.093606-05:00

Is there a reason not to do this? The sophgo upstream status page says
that the RTC is "Low priority, may not be needed." But if the above is
OK, I will submit a patch for it.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-05  0:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-30 22:56 Hardware clock on the Pioneer Michael Orlitzky
2026-01-05  0:38 ` Chen Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox