Tool/software:
Hello,
I'm using AM623 board and have an external display board connected to it. The display board has 3 SX1509 devices that are accessible through i2c-1 bus. The device tree for this setup is like this:
&main_i2c1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_i2c1_pins_default>;
clock-frequency = <400000>;
exp1: gpio@3e {
compatible = "semtech,sx1509q";
reg = <0x3e>;
gpio-controller;
#gpio-cells = <2>;
};
exp2: gpio@71 {
compatible = "semtech,sx1509q";
reg = <0x71>;
gpio-controller;
#gpio-cells = <2>;
};
exp3: gpio@70 {
compatible = "semtech,sx1509q";
reg = <0x70>;
gpio-controller;
#gpio-cells = <2>;
};
}
Now, the external board is powered up from the main board through GPIO1_25 (E15). The problem I'm having is that Linux is doing the probing of the 3 sx1509 devices on i2c-1 before the external board got powered up, so the probing is failing. I tried to follow an example from another thread to set a GPIO immediately when Linux is booted, using the gpio-hog property, but that doesn't seem to be working for me. This is how I have that GPIO in my device tree:
&main_gpio1 {
bootph-all;
display_pwr_en {
gpio-hog;
label = "DISPLAY_PWR_EN";
gpios = <25 0>;
output-high;
};
};
Do you see something wrong with this? Any advice on how I can accomplish this so GPIO1_25 switches power to the external board before I2C probing starts there?
This is the link I'm trying to follow from another thread (scroll down to the section "I want a GPIO to immediately be high/low when Linux is booted. How can this be done in the device tree?")
Thanks
-Ayman