Kernel panic beagelbone black internal rtc shutdown

We are making a custom board with beagle bone black as reference. In this custom board, there will be no crystal for internal rtc module of AM3358 MPU.

I am using the TI BSP which is build using this article : Currently, the shutdown is causing kernel panic since I have removed the rtc crystal for testing. Please tell me how to enable internal clock for rtc module so that shutdown process happens normally.

@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:

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: