From: Krzysztof Kozlowski <krzk@kernel.org>
To: Michael Orlitzky <michael@orlitzky.com>,
unicorn_wang@outlook.com, inochiama@gmail.com
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
alex@ghiti.fr, devicetree@vger.kernel.org,
sophgo@lists.linux.dev, linux-riscv@lists.infradead.org
Subject: Re: [PATCH 1/1] riscv: dts: sophgo: enable hardware clock (RTC) on the Milk-V Pioneer
Date: Mon, 5 Jan 2026 13:07:17 +0100 [thread overview]
Message-ID: <d637ad9c-fa9d-4e8d-a02f-4b22dd351f9c@kernel.org> (raw)
In-Reply-To: <20260105120129.58895-2-michael@orlitzky.com>
On 05/01/2026 13:01, Michael Orlitzky wrote:
> These boards have a working hardware clock if you put a CR-1220
> battery in them. Let's enable it:
>
> 1. Enable the (already defined) i2c0 by overriding the default
> status = "disabled" with "okay".
Do not describe the diff. This is obvious. Explain WHY you are doing all
this.
>
> 2. Define the rtc on &i2c0. This is more or less the example from the
> documentation (devicetree/bindings/rtc/rtc-ds1307.yaml), and it was
> present in the same form in an earlier 6.1.x vendor kernel.
>
> 3. Copy the pinctrl stuff from &i2c1 and update the PINMUX constants
> with the IIC0 values from dt-bindings/pinctrl/pinctrl-sg2042.h.
Drop, irrelevant.
>
> Afterwards, the new I2C and RTC can be enabled with,
>
> * CONFIG_I2C_DESIGNWARE_CORE=y
> * CONFIG_I2C_DESIGNWARE_PLATFORM=y
> * CONFIG_RTC_DRV_DS1307=y
Drop, irrelevant. You describe here hardware, not Linux kernel config.
>
> The new I2C should appear under /sys/devices/platform/soc, and with
> any luck you'll have a clock the next time you boot:
>
> [ T367] rtc-ds1307 5-0068: registered as rtc0
> [ T367] rtc-ds1307 5-0068: setting system clock to ...
Drop, obvious.
>
> Signed-off-by: Michael Orlitzky <michael@orlitzky.com>
> ---
> .../boot/dts/sophgo/sg2042-milkv-pioneer.dts | 21 +++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
Best regards,
Krzysztof
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-01-05 12:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 12:01 [PATCH 0/1] Enable hardware clock (RTC) on the Milk-V Pioneer Michael Orlitzky
2026-01-05 12:01 ` [PATCH 1/1] riscv: dts: sophgo: enable " Michael Orlitzky
2026-01-05 12:07 ` Krzysztof Kozlowski [this message]
2026-01-06 2:10 ` Chen Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d637ad9c-fa9d-4e8d-a02f-4b22dd351f9c@kernel.org \
--to=krzk@kernel.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=inochiama@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=michael@orlitzky.com \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=sophgo@lists.linux.dev \
--cc=unicorn_wang@outlook.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox