Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

OrangePiZero 3 and w1-gpio for DS18B20

Featured Replies

Solved by TRay

  • Author

I try to understand problem

 

[ 4.997793] sun50i-h616-pinctrl 300b000.pinctrl: pin PC10 already requested by onewire@0; cannot claim for 300b000.pinctrl:74

 

and I see this message is generate by:

 

https://github.com/torvalds/linux/blob/master/drivers/pinctrl/pinmux.c#L102

 

/**
 * pin_request() - request a single pin to be muxed in, typically for GPIO
 * @pctldev: the associated pin controller device
 * @pin: the pin number in the global pin space
 * @owner: a representation of the owner of this pin; typically the device
 *    name that controls its mux function, or the requested GPIO name
 * @gpio_range: the range matching the GPIO pin if this is a request for a
 *    single GPIO pin
 */

......


	if ((!gpio_range || ops->strict) &&
	    desc->mux_usecount && strcmp(desc->mux_owner, owner)) {
		dev_err(pctldev->dev,
			"pin %s already requested by %s; cannot claim for %s\n",
			desc->name, desc->mux_owner, owner);
		goto out;
	}

	if ((gpio_range || ops->strict) && desc->gpio_owner) {
		dev_err(pctldev->dev,
			"pin %s already requested by %s; cannot claim for %s\n",
			desc->name, desc->gpio_owner, owner);
		goto out;
	}
.....

 

  • Author
  • Solution

I used simple dts file as possible :

 

/dts-v1/;
/plugin/;
/ {
    model = "OrangePi Zero3";
    compatible = "xunlong,orangepi-zero3", "allwinner,sun50i-h618";
    fragment@0 {
            target-path = "/";
            __overlay__ {
                    w1: onewire@0 {
                            compatible = "w1-gpio";
                            pinctrl-names = "default";
                            gpios = <&pio 2 7 0>;
                            status = "okay";
                    };
            };
    };
};

 

compiled:

 

armbian-add-overlay w1-gpio.dts

 

and works  🙂 with armbianEnv.txt

 

user_overlays=w1-gpio
param_w1_pin=PC10
param_w1_pin_int_pullup=0

 

demsg show

 

[    5.015541] Driver for 1-wire Dallas network protocol.
[    5.019754] gpio-74 (onewire@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[    5.046831] w1_master_driver w1_bus_master1: Attaching one wire slave 28.03165129ecff crc 24

 

and

cat /sys//bus/w1/devices/28-03165129ecff/w1_slave


76 01 4b 46 7f ff 0c 10 d3 : crc=d3 YES
76 01 4b 46 7f ff 0c 10 d3 t=23375


 

      SBC                         DS18B20
  
VCC (3V3)    Pin 1 ----------   VCC    DS18B20
                            |
                          R1 = 4k7
                            |
GPIO74       Pin 26 ---------   Data   DS18B20

GND          Pin 6 ----------   GND    DS18B20

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.