Hi!
We are trying to map a maxim mcp795 RTC device in our device tree. It's on spi1 bus, so far we've added the following with no luck:
pinctrl-names = "default";
pinctrl-0 = <&spi1_default>;
cs-gpios = <&gpe 2 GPIO_ACTIVE_LOW>;
status = "okay";
mcp795: mcp795@0 { /* RTC */
compatible = "maxim,mcp795";
reg = <0>; // SPI1_SEL4 / GPIO_PE02
spi-max-frequency = <1000000>;
status = "okay";
};
};
CONFIG_SPI_SPIDEV is not set (this one I assume is only for "generic" spidev functionality e.g. /dev/spidevN.N, but we have a specific peripheral).
[ 32.162383] rtc-mcp795 spi1.4: registered as rtc0
hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument
* The pin number on the gpio port, that would in our case mean PORT E (offset 128) + 2 == 130