Hello,
We have a board using 66AK2G processor and a SPI/I2C to UART chip, MAX3107, see below. We are using SPI1 bus to control max3107.
We do not use DCAN0 and DCAN1, so K2G's H21,H22 pins are used as simple GPIO input/output pins.
There are several required properties of the max3107 in device tree,
required: - compatible - reg - interrupts - clocks - clock-names
I am wondering how to add the interrupts information to the device tree? Also, is the clock information, clk_4M , correct? Entries that are no sure enough are in red color text.
/dts-v1/;
#include "keystone-k2g.dtsi"
/ {
compatible = "ti,k2g-evm", "ti,k2g", "ti,keystone";
model = "Texas Instruments K2G General Purpose EVM";
memory@800000000 {
device_type = "memory";
reg = <0x00000008 0x00000000 0x00000000 0x80000000>;
};
. . . . .
clk_4M: clk_4M { /* for spi uart max3107 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <4000000>;
};
};
&spi1 {
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins>;
status = "okay";
/* UART expander, MAX3107 */
max310x_0: max0@0 {
compatible = "maxim,max3107";
spi-max-frequency = <10000000>; //<125000000>
reg = <0>;
interrupt-parent = <?>; /* optional */
interrupts = <? ?>; /* required */
clocks = <&clk_4M>;
clock-names = "osc";
};
};
Tom