From 92f9628787b8cba5108993f73e170c40c5caabdd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 28 Mar 2017 14:22:20 +0100 Subject: [PATCH] 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. --- arch/arm/boot/dts/overlays/w1-gpio-overlay.dts | 6 ++++-- arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/overlays/w1-gpio-overlay.dts b/arch/arm/boot/dts/overlays/w1-gpio-overlay.dts index 29a3b48d19ab..f7f874751265 100644 --- a/arch/arm/boot/dts/overlays/w1-gpio-overlay.dts +++ b/arch/arm/boot/dts/overlays/w1-gpio-overlay.dts @@ -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"; }; }; diff --git a/arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts b/arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts index 66a98f6c9601..ef8bfbcabdb3 100644 --- a/arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts +++ b/arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts @@ -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"; -- 2.30.2