I'm new to Raspberry Pi and I'm already dealing with the Device Tree monster.
I'm trying to port an old project in which, over the years, I ran out of RAM. I want to re-use almost all the old hardware, which means I need to get multiple SC16IS752 chips running over SPI.
After hours of research about this, I found out that the RPI can use more than the HW CS by using GPIO CS. Running some tests I could add more CS with a DTO with kernel 4.1, but the SC16IS7XX SPI drivers are on 4.4 so I ran the rpi-update. Now, the additionals chip selects are nowhere to be seen

This is the DTO I used for the SC16IS752:
Code: Select all
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709";
fragment@0 {
target = <&spi0>;
frag0: __overlay__ {
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
status = "okay";
cs-gpios = <0>, <0>, <&gpio 23 1>, <&gpio 24 1>;
spidev@2{
compatible = "spidev";
reg = <2>; /* CE2 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
};
spidev@3{
compatible = "spidev";
reg = <3>; /* CE3 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
};
sc16is752@2 {
compatible = "nxp,sc16is752";
reg = <2>;
clocks = <&sc16is752_clk>;
interrupt-parent = <&gpio>;
interrupts = <2 2>; /* IRQ_TYPE_EDGE_FALLING */
#gpio-controller;
#gpio-cells = <2>;
#spi-max-frequency = <4000000>;
sc16is752_clk: sc16is752_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <1843200>;
};
};
};
};
fragment@1 {
target = <&gpio>;
__overlay__ {
spi0_cs_pins: spi0_cs_pins {
brcm,pins = <23 24>;
brcm,function = <1>; /* out */
};
};
};
__overrides__ {
cs2_pin = <&frag0>,"cs-gpios:12", <&spi0_cs_pins>,"brcm,pins:0";
cs3_pin = <&frag0>,"cs-gpios:24", <&spi0_cs_pins>,"brcm,pins:4";
};
};
Thanks in advance,
Mariano.