0

I am receiving an error as under in the bootup logs when my kernel 4.2 armv7l ( and hardware OMAP35xSOM-LV, a LogicPD board) boots up.

[  14.893432] omap_ssi 48058000.ssi-controller: ssi controller 0 initialized (2 ports)!
[   14.959777] omap_ssi_port 4805a000.ssi-port: couldn't get cawake gpio (err=-2)!
[   15.034698] omap_ssi_port: probe of 4805a000.ssi-port failed with error -2
[   15.130096] omap_ssi_port 4805b000.ssi-port: couldn't get cawake gpio (err=-2)!

I can see this ssi port controller disabled in one of the the device tree files (omap3.dtsi) but still this error shows up when the kernel boots up. How to suppress this error ? I am new to device tree concept. For more clarity the relevant code inside omap3.dtsi referring to the ports in discussion is as under:

ssi: ssi-controller@48058000 {
    compatible = "ti,omap3-ssi";
    ti,hwmods = "ssi";

    status = "disabled";

    reg = <0x48058000 0x1000>, <0x48059000 0x1000>;
    reg-names = "sys", "gdd";

    interrupts = <71>;
    interrupt-names = "gdd_mpu";

    #address-cells = <1>;
    #size-cells = <1>;
    ranges;

    ssi_port1: ssi-port@4805a000 {
        compatible = "ti,omap3-ssi-port";
        reg = <0x4805a000 0x800>, <0x4805a800 0x800>;
        reg-names = "tx", "rx";
        interrupts = <67>, <68>;
    };

    ssi_port2: ssi-port@4805b000 {
        compatible = "ti,omap3-ssi-port";
        reg = <0x4805b000 0x800>, <0x4805b800 0x800>;
        reg-names = "tx", "rx";
        interrupts = <69>, <70>;
    };
};
0andriy
  • 4,183
  • 1
  • 24
  • 37
Mukul Mehra
  • 91
  • 1
  • 9
  • 2
    The .dtsi files are there to be included by other .dtsi files or the main .dts file. So even though the ssi port controller is disabled in omap3.dtsi, it is probably being enabled in some other .dtsi or .dts file. – Ian Abbott Mar 02 '21 at 17:01
  • The reference to ssi port@48058000 (as displayed in the logs) is not present inside other dtsi files except for the omap3.dtsi file. The file is included in my board specific dts file so I am not sure how the reference to the ssi-port@4805a000 file is showing up even though it is disabled (refer to fig.). Updated the question to include the code snippet in discussion. – Mukul Mehra Mar 02 '21 at 19:55
  • 2
    If there is no `&ssi {` `}` block in the main board dts file (or some other included .dtsi file) that is enabling it, the only other thing I can think of is that maybe a .dtbo file is being loaded by your board's boot loader, or by the Linux system itself (if the kernel is patched to allow loading DTB overlays from userspace). – Ian Abbott Mar 02 '21 at 20:00
  • I checked the dtb file that goes inside my target (dtc -I dtb -O dts -o - target.dtb). I found that the blob does not have the controller disabled although from the device tree source the controller is clearly disabled. – Mukul Mehra Mar 02 '21 at 21:27
  • There is no mention of cawake property in the entire device-tree directory. – Mukul Mehra Mar 03 '21 at 15:15
  • 1
    The error should actually occur when the `ti,ssi-cawake-gpio` property is missing (from the `"ti,omap3-ssi-port"` compatible device node). Does **cat /proc/device-tree/ocp@68000000/ssi-controller@48058000/status** indicate the SSI controller is "okay" or "disabled"? Does **/proc/device-tree/ocp@68000000/ssi-controller@48058000/ssi-port@4805a000/ti,ssi-cawake-gpio** exist? – Ian Abbott Mar 03 '21 at 18:31
  • 1
    The [docs](https://www.kernel.org/doc/Documentation/devicetree/bindings/hsi/omap-ssi.txt) list `ti,ssi-cawake-gpio` under the "Required Port sub-node properties" for the OMAP SSI Controller, but describe the property as: "Defines which GPIO pin is used to signify CAWAKE events for the port. This is an optional board-specific property. If it's missing the port will not be enabled." The language is confusing since it is both required and optional (?!), but perhaps this is normal behavior. If it is normal, then the log severity level of "ERROR" seems a bit excessive. – Ian Abbott Mar 03 '21 at 18:41
  • The cat /proc/device-tree/ocp@68000000/ssi-controller@48058000/status outputs ok. There is no /proc/device-tree/ocp@68000000/ssi-controller@48058000/ssi-port@4805a000/ti,ssi-cawake-gpio. Yes it is optional as per the text and if the cawake pin/feature is not included in the dts then how is it getting referred to at boot time and why is it getting probed for? I did see that the error is thrown up by the hsi controller's C-logic. How can we suppress the probing of these controller pins? – Mukul Mehra Mar 05 '21 at 11:26
  • @IanAbbott I think I agree with your assessment after reading the probing logic used in the omap_ssi_port.c. The code specifically checks for the cawake pin and throws up an error where it could have just echoed a warning. – Mukul Mehra Mar 10 '21 at 17:38

1 Answers1

0

The warning can be suppressed from inside the drivers/hsi/controllers/omap_ssi_port.c. The document keeps the cawake gpio as an optional component. Since the cawake gpio is just a multiplexed form (and not an actual hardware pin) it does not make any sense to disable it inside the device tree (for atleast omap3 series).

cawake_gpio = devm_gpiod_get(&pd->dev, "ti,ssi-cawake", GPIOD_IN);
/*        if (IS_ERR(cawake_gpio)) {
                err = PTR_ERR(cawake_gpio);
                dev_err(&pd->dev, "couldn't get cawake gpio (err=%d)!\n", err);
                goto error;
        }
*/
Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Mukul Mehra
  • 91
  • 1
  • 9
  • Alternatively, one could try the slution at this link --> https://e2e.ti.com/support/microcontrollers/other/f/other-microcontrollers-forum/985202/omap3-cawake-gpio – Mukul Mehra Mar 15 '21 at 11:42