Commit 7b6735fb authored by Phil Elwell's avatar Phil Elwell
Browse files

BCM270X_DT: Allow multiple instances of w1-gpio overlays

Upcoming firmware will modify the address portion of node names when
their "reg" property is written by a dtparam. Modify the w1-gpio
overlays to write the gpiopin parameter value to "reg" properties, so
that multiple instances can be loaded simultaneously.

Note: The value of the "address" is unimportant - the w1 subsystem
assigns instance numbers to buses sequentially from 1, and it is
not necessary to know which bus a device is on in order to find it.
parent 1e628b3e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
	fragment@1 {
		target = <&gpio>;
		__overlay__ {
			w1_pins: w1_pins {
			w1_pins: w1_pins@0 {
				brcm,pins = <4>;
				brcm,function = <0>; // in (initially)
				brcm,pull = <0>; // off
@@ -33,7 +33,9 @@

	__overrides__ {
		gpiopin =       <&w1>,"gpios:4",
				<&w1_pins>,"brcm,pins:0";
				<&w1>,"reg:0",
				<&w1_pins>,"brcm,pins:0",
				<&w1_pins>,"reg:0";
		pullup =        <&w1>,"rpi,parasitic-power:0";
	};
};
+4 −2
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
	fragment@1 {
		target = <&gpio>;
		__overlay__ {
			w1_pins: w1_pins {
			w1_pins: w1_pins@0 {
				brcm,pins = <4 5>;
				brcm,function = <0 1>; // in out
				brcm,pull = <0 0>; // off off
@@ -33,7 +33,9 @@

	__overrides__ {
		gpiopin =       <&w1>,"gpios:4",
				<&w1_pins>,"brcm,pins:0";
				<&w1>,"reg:0",
				<&w1_pins>,"brcm,pins:0",
				<&w1_pins>,"reg:0";
		extpullup =     <&w1>,"gpios:16",
				<&w1_pins>,"brcm,pins:4";
		pullup =        <&w1>,"rpi,parasitic-power:0";