有一个奇怪的问题不知道大家有没有遇到过
我们的板子上有一个挂载在i2c1上的eeprom的写保护接到这里了
在设备树上的配置如下
eeprom_pins_default:pinmux_eeprom_pins {
pinctrl-single,pins = <
0xE0 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* lcd_vsync.gpio2_22 */
>;
};
i2c1_pins_default: pinmux_i2c1_pins {
pinctrl-single,pins = <
0x168 (PIN_INPUT_PULLUP | MUX_MODE3) /* uart0_ctsn.i2c1_sda */
0x16c (PIN_INPUT_PULLUP | SLEWCTRL_SLOW | MUX_MODE3) /* uart0_rtsn.i2c1_scl */
>;
};
&i2c1 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c1_pins_default>;
pinctrl-1 = <&i2c1_pins_sleep>;
status = "okay";
clock-frequency = <100000>;
eeprom@54 {
compatible = "at24,24c04";
pinctrl-names = "default";
pinctrl-0 = <&eeprom_pins_default>;
gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
reg = <0x54>;
};
eeprom@55 {
compatible = "at24,24c04";
pinctrl-names = "default";
pinctrl-0 = <&eeprom_pins_default>;
gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
reg = <0x55>;
};
};
内核驱动在获取这个gpio值的时候,直接就段错误了,但是gpio设置成比如说1 _5就没问题,
请求支持