Well said!I prefer to group related operations and avoid duplication - chacun à son goût.
That's why I've changed it to
Code:
fragment@10 {target = <&spi0>;frag11: __overlay__ {/* needed to avoid dtc warning */#address-cells = <1>;#size-cells = <0>;cs-gpios = <&gpio 8 1>;status = "okay";spidev0_0: spidev@0 {compatible = "spidev";reg = <0>; /* CE0 */#address-cells = <1>;#size-cells = <0>;spi-max-frequency = <125000000>;status = "okay";};};};Code:
0: op dh pu | hi // ID_SDA/GPIO0 = output 1: a8 pn | lo // ID_SCL/GPIO1 = SPI2_SIO1 2: a8 pn | hi // GPIO2 = SPI2_SIO0 3: a8 pn | lo // GPIO3 = SPI2_SCLK 4: no pu | -- // GPIO4 = none 5: ip pu | hi // GPIO5 = input 6: ip pu | hi // GPIO6 = input 7: a0 pu | hi // GPIO7 = SPI0_CE1 8: op dh pu | hi // GPIO8 = output 9: a0 pn | lo // GPIO9 = SPI0_MISO10: a0 pn | lo // GPIO10 = SPI0_MOSI11: a0 pn | hi // GPIO11 = SPI0_SCLK12: no pd | -- // GPIO12 = none13: no pd | -- // GPIO13 = none14: no pd | -- // GPIO14 = none15: no pd | -- // GPIO15 = none16: no pd | -- // GPIO16 = none17: no pd | -- // GPIO17 = none18: no pd | -- // GPIO18 = none19: no pd | -- // GPIO19 = none20: no pd | -- // GPIO20 = none21: no pd | -- // GPIO21 = none22: no pd | -- // GPIO22 = none23: no pd | -- // GPIO23 = none24: op dh pd | hi // GPIO24 = output25: op dh pd | hi // GPIO25 = output26: no pd | -- // GPIO26 = none27: no pd | -- // GPIO27 = noneThanks for that! Will have to look at it and understand how to use that.Is the Pi 5 dts not enough of an example? From bcm2712-rpi-5-b.dts:Any idea how to enable the PWM0 related GPIO?and from rp1.dtsi:Code:
&rp1_pwm1 {status = "disabled";pinctrl-0 = <&rp1_pwm1_gpio45>;pinctrl-names = "default";};Code:
rp1_pwm1_gpio45: rp1_pwm1_gpio45 {function = "pwm1";pins = "gpio45";bias-pull-down;};
That's the FAN_PWM from gpiochip4.
What I need are line 12/13/14 from said gpiochip.
what comes to my mind is something like
Code:
rp1_pwm0_gpio12: rp1_pwm0_gpio12{function = "pwm0";pins = "gpio12", "gpio13, "gpio14", "gpio15" ;bias-pull-down;};Also, shouldn't that then be part of rp1.dtsi?
I think now you get my point why I've started with a PWM controller definition in my initial post.
Statistics: Posted by aBUGSworstnightmare — Thu Feb 22, 2024 10:19 am