Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinctr dummy regulators #6676

Merged
merged 4 commits into from
Jun 1, 2024
Merged

Conversation

stephengraf
Copy link
Contributor

Description

Add dummy regulators to pinctr dts for orangepione SBC. This will prevent the kernel driver from issuing warnings "supply vcc-xx not found, using dummy regulator" for the dummy regulators added.

Documentation summary for feature / change

How Has This Been Tested?

Initially the dts entries were manually added to a running system using the dts editor in armbian-config to verify that the changes produced the desired result.

Then a kernel patch was created, put into a git repository and an image generated from that repository. After installing the image on an orangepione the dtb was examined via the dts editor of armbian-config to confirm the presence of the required entries and the relevant output of dmesg was compared to a dmesg prior to the changed image.

Patched pinctr:
pinctrl@1c20800 {
reg = <0x1c20800 0x400>;
interrupt-parent = <0x1c>;
interrupts = <0x00 0x0b 0x04 0x00 0x11 0x04>;
clocks = <0x03 0x36 0x1a 0x1b 0x00>;
clock-names = "apb\0hosc\0losc";
gpio-controller;
#gpio-cells = <0x03>;
interrupt-controller;
#interrupt-cells = <0x03>;
compatible = "allwinner,sun8i-h3-pinctrl";
vcc-pa-supply = <0x15>;
vcc-pc-supply = <0x15>;
vcc-pd-supply = <0x15>;
vcc-pg-supply = <0x15>;
phandle = <0x16>;

Before dmesg:

[ 1.624523] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 1.627934] sun8i-h3-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 1.628539] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 1.630347] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[ 1.630717] sun8i-h3-pinctrl 1c20800.pinctrl: supply vcc-pa not found, using dummy regulator
[ 1.631449] printk: console [ttyS0] disabled
[ 1.631881] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 138, base_baud = 1500000) is a 16550A
[ 1.631943] printk: console [ttyS0] enabled
[ 1.662003] sun4i-drm display-engine: bound 1100000.mixer (ops 0xc0bb3530)
[ 1.664046] sun4i-drm display-engine: bound 1200000.mixer (ops 0xc0bb3530)
[ 1.664515] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0baed88)
[ 1.664916] sun4i-drm display-engine: bound 1c0d000.lcd-controller (ops 0xc0baed88)
[ 1.665001] sun8i-dw-hdmi 1ee0000.hdmi: supply hvcc not found, using dummy regulator
[ 1.665983] sun8i-dw-hdmi 1ee0000.hdmi: Detected HDMI TX controller v1.32a with HDCP (sun8i_dw_hdmi_phy)
[ 1.666767] sun8i-dw-hdmi 1ee0000.hdmi: registered DesignWare HDMI I2C bus driver
[ 1.667325] sun4i-drm display-engine: bound 1ee0000.hdmi (ops 0xc0bb28fc)
[ 1.668197] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.668296] sun4i-drm display-engine: [drm] Cannot find any crtc or sizes
[ 1.672029] sun8i-h3-r-pinctrl 1f02c00.pinctrl: supply vcc-pl not found, using dummy regulator
[ 1.672085] sun8i-h3-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator
[ 1.672396] sun4i-drm display-engine: [drm] Cannot find any crtc or sizes
[ 1.676045] sun8i-h3-pinctrl 1c20800.pinctrl: supply vcc-pg not found, using dummy regulator

After dmesg (note that supply vcc-pa and pg warnings are not present):

[ 1.993966] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 1.997326] sun8i-h3-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 1.997891] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 1.999757] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[ 2.000715] printk: console [ttyS0] disabled
[ 2.001152] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 138, base_baud = 1500000) is a 16550A
[ 2.001213] printk: console [ttyS0] enabled
[ 2.031315] sun4i-drm display-engine: bound 1100000.mixer (ops 0xc0bb3530)
[ 2.033318] sun4i-drm display-engine: bound 1200000.mixer (ops 0xc0bb3530)
[ 2.033766] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0baed88)
[ 2.034153] sun4i-drm display-engine: bound 1c0d000.lcd-controller (ops 0xc0baed88)
[ 2.034238] sun8i-dw-hdmi 1ee0000.hdmi: supply hvcc not found, using dummy regulator
[ 2.035482] sun8i-dw-hdmi 1ee0000.hdmi: Detected HDMI TX controller v1.32a with HDCP (sun8i_dw_hdmi_phy)
[ 2.036244] sun8i-dw-hdmi 1ee0000.hdmi: registered DesignWare HDMI I2C bus driver
[ 2.036617] sun4i-drm display-engine: bound 1ee0000.hdmi (ops 0xc0bb28fc)
[ 2.037494] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 2.037592] sun4i-drm display-engine: [drm] Cannot find any crtc or sizes
[ 2.041301] sun8i-h3-r-pinctrl 1f02c00.pinctrl: supply vcc-pl not found, using dummy regulator
[ 2.041356] sun8i-h3-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator

Checklist:

  • [ x ] My code follows the style guidelines of this project
  • [ x ] I have performed a self-review of my own code
  • [ x ] My changes generate no new warnings

@github-actions github-actions bot added size/small PR with less then 50 lines Hardware Hardware related like kernel, U-Boot, ... labels May 31, 2024
@stephengraf
Copy link
Contributor Author

Reason for change:
While testing change from gpio sys to gpio cdev I noticed that a kernel warning was issued to syslog on many gpio cdev operations. This issue could be minimal or significant, depending on how user code is written.

A solution was implemented on another SOC:
https://lore.kernel.org/all/462969fd722eec45aa5f142de48b7fbd@ccbib.org/T/
As mentioned in the article, because the regulators are fixed voltage without any controls, software has no affect on the regulators, ie "dummy", but does satisfy kernel drivers.

This patch was generated using the article as a template. Only gpio groups that are available on the orangepione header are supplied with dummy regulators as these groups are supplied with 3.3v hardwired.

@AGM1968 AGM1968 merged commit 6b512ab into armbian:main Jun 1, 2024
5 checks passed
igorpecovnik pushed a commit that referenced this pull request Jun 1, 2024
* Add files via upload

* Update series.armbian

* Update series.conf

* Update arm-dts-orangepi-one-pinctr-dummy-regulators.patch
@stephengraf stephengraf deleted the pinctr-dummy-regulators branch June 2, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hardware Hardware related like kernel, U-Boot, ... size/small PR with less then 50 lines
Development

Successfully merging this pull request may close these issues.

2 participants