Kernel panic beagelbone black internal rtc shutdown

@kiranbv, to make this work, you will have to make two changes.

One to u-boot and the other to the kernel device tree.

Due to the design of the RTC on the am335x, you must set this configuration early in u-boot before the RTC locks down those registers. We do have 2 boards in the Beagle Family that require this same setting. In our u-boot patch (same one used on the eewiki page), you’ll need to update it for your specific board. (Or just hard code)

u-boot patch: https://github.com/eewiki/u-boot-patches/blob/master/v2019.04/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch#L195-L205

Here is the section you will need to update, essentially you will need to follow the PocketBeagle (board_is_pb) and BeagleBone Blue (board_is_blue) logic, which share the same RTC design that you’ve chosen, thus force SEL_32KCLK_SRC to 0 to be internal.

	if (board_is_pb() || board_is_blue()) {
		/* 6: EN_32KCLK */
		/* 3: SEL_32KCLK_SRC 0: internal, 1: external */
		writel((0 << 3) | (1 << 6), &rtc->osc);
	} else {
		/* Enable the RTC 32K OSC by setting bits 3 and 6. */
		writel((1 << 3) | (1 << 6), &rtc->osc);
	}

Next in the Kernel, you need to make a few changes… In the “&rtc” node, rip out the, clocks and clock-name options. For example, on the Blue:

Regards,