boot.ini:
Code: Select all
fdt rm i2c1 rtc@51
fdt mknode i2c1 rtc@68
fdt set i2c1/rtc@68 compatible "ds3231"
fdt set i2c1/rtc@68 reg "<68>"
fdt set i2c1/rtc@68 status "okay"
bootm
Code: Select all
Bad Linux ARM64 Image magic!
libfdt fdt_delprop(): FDT_ERR_NOTFOUND
I am trying this on @voodiks LineageOS 17.1, but I guess this is related to the stock uboot.
I have to rm the rtc@51, to get place to add my node.
Here some log snipsets from uboot command line:
Code: Select all
odroidc4#movi read dtbs 0 0x1000000
movi: the partiton 'dtbs' is reading...
odroidc4#fdt addr 0x1000000
odroidc4#fdt mknode i2c1 rtc@68
libfdt fdt_add_subnode(): FDT_ERR_NOSPACE
odroidc4#fdt rm i2c1/rtc@51
odroidc4#fdt mknode i2c1 rtc@68
odroidc4#fdt set i2c1/rtc@68 compatible "ds3231"
odroidc4#fdt set i2c1/rtc@68 reg "<68>"
odroidc4#fdt set i2c1/rtc@68 status "okay"
odroidc4#fdt print i2c1
i2c@1d000 {
compatible = "amlogic,meson-g12a-i2c";
status = "okay";
reg = <0x00000000 0x0001d000 0x00000000 0x00000020>;
interrupts = <0x00000000 0x000000d7 0x00000001 0x00000000 0x0000005e 0x00000001>;
#address-cells = <0x00000001>;
#size-cells = <0x00000000>;
clocks = <0x00000002 0x0000002a>;
clock-names = "clk_i2c";
pinctrl-names = "default", "gpio_periphs";
pinctrl-0 = <0x0000001f>;
pinctrl-1 = <0x00000020>;
clock-frequency = <0x000186a0>;
phandle = <0x000000b1>;
rtc@68 {
status = "okay";
reg = <0x00000044>;
compatible = "ds3231";
};
};