Re: [PATCH 1/1] riscv: dts: sophgo: enable hardware clock (RTC) on the Milk-V Pioneer

Krzysztof Kozlowski <[email protected]>
Newsgroups dev.linux.lists.sophgo,org.infradead.lists.linux-riscv,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
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 <[email protected]>
> ---
>  .../boot/dts/sophgo/sg2042-milkv-pioneer.dts  | 21 +++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 


Best regards,
Krzysztof
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.