Skip to content

Help: Stuck on getting driver binding #37086

Answered by mcscholtz
mcscholtz asked this question in Q&A
Discussion options

You must be logged in to vote

I found the problem. I had to make the following change to the device tree:

&i2c1 {
	// EEPROM IO
	pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb9>;
	clock-frequency = <I2C_BITRATE_FAST>;
	status = "okay";

	i2c_eeprom: eeprom@50 {
		compatible = "atmel,at24";                                  //atmel,at24 not atmel,at2x
		reg = <0x50>;
		label = "eeprom";
		wp-gpios = <&gpiob 7 GPIO_ACTIVE_LOW>;    //wp-gpios not wp-gpio
		size = <DT_SIZE_M(2)>;
		pagesize = <256>;
		address-width = <16>;
		timeout = <10>;
		status = "okay";
	};
};

After that I could get the driver with:

DEVICE_DT_GET_ANY(atmel_at24);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mcscholtz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area: Devicetree Binding PR modifies or adds a Device Tree binding
1 participant