Re: [PATCHv3] arm64: dts: meson: Enable active coling using gpio-fan on Odroid N2/N2+

From: Anand Moon
Date: Sat Oct 22 2022 - 07:38:36 EST


Hi Martin,

Thanks for your review comments..

On Sat, 22 Oct 2022 at 15:47, Martin Blumenstingl
<martin.blumenstingl@xxxxxxxxxxxxxx> wrote:
>
> Hi Anand,
>
> On Sat, Oct 22, 2022 at 10:48 AM Anand Moon <linux.amoon@xxxxxxxxx> wrote:
> >
> > Odroid N2/N2+ support active cooling via gpio-fan controller.
> > Add fan controls and tip point for cpu and ddr thermal sensor
> > on this boards. Drop bias-disable from set pwm_ao_d_10 the pin
> either use "on these boards" or "on this board"
>
> [...]
> > @@ -1982,7 +1982,6 @@ pwm_ao_d_10_pins: pwm-ao-d-10 {
> > mux {
> > groups = "pwm_ao_d_10";
> > function = "pwm_ao_d";
> > - bias-disable;
> &pwm_ao_d_10_pins is not referenced anywhere so it seems that this
> change has no impact on controlling the fan on Odroid-N2(+).
> How did you test this change?
>
Ok I felt these changes affect the behavior of the pinctrl

* @PIN_CONFIG_BIAS_DISABLE: disable any pin bias on the pin, a
* transition from say pull-up to pull-down implies that you disable
* pull-up in the process, this setting disables all biasing.

I mapped this is linked in pinctrl driver, pwm_ao_d_10_pins GPIOAO_10 see below

[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pinctrl/meson/pinctrl-meson-g12a.c?h=v6.1-rc1#n825

For testing, I tried to libgpio command to verify shown below, with
this patch applied.
$ gpioinfo
....
gpiochip1 - 15 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed "enable" output active-high [used]
line 3: unnamed unused input active-high
line 4: unnamed unused output active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed "regulator-tflash_vdd" output active-high [used]
line 9: unnamed "TF_IO" output active-high [used]
line 10: unnamed "gpio-fan" output active-high [used]
line 11: unnamed "n2:blue" output active-high [used]
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high

$ cat /sys/kernel/debug/pinctrl/ff800000.sys-ctrl\:pinctrl@14-pinctrl-meson/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
pin 0 (GPIOAO_0): ff803000.serial (GPIO UNCLAIMED) function uart_ao_a
group uart_ao_a_tx
pin 1 (GPIOAO_1): ff803000.serial (GPIO UNCLAIMED) function uart_ao_a
group uart_ao_a_rx
pin 2 (GPIOAO_2): (MUX UNCLAIMED) aobus-banks:1950
pin 3 (GPIOAO_3): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 4 (GPIOAO_4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 5 (GPIOAO_5): ff808000.ir (GPIO UNCLAIMED) function
remote_ao_input group remote_ao_input
pin 6 (GPIOAO_6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 7 (GPIOAO_7): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 8 (GPIOAO_8): (MUX UNCLAIMED) aobus-banks:1956
pin 9 (GPIOAO_9): (MUX UNCLAIMED) aobus-banks:1957
pin 10 (GPIOAO_10): (MUX UNCLAIMED) aobus-banks:1958
pin 11 (GPIOAO_11): (MUX UNCLAIMED) aobus-banks:1959
pin 12 (GPIOE_0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 13 (GPIOE_1): ff802000.pwm (GPIO UNCLAIMED) function pwm_ao_d
group pwm_ao_d_e
pin 14 (GPIOE_2): ffd1b000.pwm (GPIO UNCLAIMED) function pwm_a_e group pwm_a_e

$ sudo gpiomon gpiochip1 10
gpiomon: error waiting for events: Device or resource busy

$ sudo gpioget gpiochip1 10
gpioget: error reading GPIO values: Device or resource busy

If I am wrong I have previously sent it with a typo correction below.

[1] https://lore.kernel.org/all/20221021050906.1158-1-linux.amoon@xxxxxxxxx/

Thanks
-Anand
>
> Best regards,
> Martin