• Register
    • Login
    • Search
    • Recent
    • Wiki
    • Github
    • 百度网盘
    • Onedrive
    • Official
    • Shop
    1. Home
    2. zensation
    Z
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 32
    • Best 0
    • Controversial 0
    • Groups 0

    zensation

    @zensation

    0
    Reputation
    3
    Profile views
    32
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    zensation Unfollow Follow

    Latest posts made by zensation

    • RE: CoolPi 4B硬件扩展四:GPIO

      after doing more research it seems you have to compile the dts files into a pre processed file with cpp command before you can compile into a dtb file with the dtc command. so i got that figured out and can change the io pullups.

      however im still struggling with the wakeup from suspend conditions. I enabled several of them but none seem to work. usb hubs are suspended so usb wakeup doesnt work, the Uart0 wakeup condition is enabled but doesnt wakeup the processor either. ill have to keep digging, but if you are anyone knows how to wakeup from a source other than the power button that would be great to know. as it stands ill have to add a secondary microprocessor to the system to ground the power button contact physically to wake up the board.

      posted in Hardware
      Z
      zensation
    • RE: CoolPi 4B硬件扩展四:GPIO

      @george so here is where I am at. Ive spent a lot of time trying to figure this out but nothing is making sense so maybe you can give me a direct file of what will work. I have done this:

      1. navigate to folder of rk3588s-cp4.dtb (/boot/firmware/rk3588s-cp4.dtb)
      2. converted the dtb file to dts file using command: sudo dtc -I dtb -O dts rk3588s-cp4.dtb -o rk3588s-cp4.dts
      3. nano to open the file: sudo nano rk3588s-cp4.dts

      heres where im stuck...theres nothing in that file that resembles the syntax you have sent me. I will attach the dts file in txt format here. can you edit it with the correction to change pin 32 from pull up to pull down? thanks!
      rk3588s-cp4.txt

      alternatively, on line 1562 i find there is an entry for wake from suspend such as below.

      rockchip,wakeup-config = <0x100>;

      can you tell me how to change this line to enable GPIO wake from suspend? then I can use whatever GPIO I wish to wake the cool-pi 4b up when suspended without physically pushing the button. I have tried the syntax below but i get a syntax error when i try to convert it back to dtb file:

      rockchip,wakeup-config = <
      (0
      | RKPM_GPIO_WKUP_EN
      )
      >;

      posted in Hardware
      Z
      zensation
    • RE: CoolPi 4B硬件扩展四:GPIO

      @george ok this explains things better. I have a HAT that was designed for the raspberry pi 4 and it has a power detection pin on pin 32. it needs to be pulled down in order to function because the hat sends 3.3v to the pin as long as incoming power is detected on the power in lines of the HAT. then when the incoming power dissapears from the hat incoming lines, pin 32 will be pulled low by the pull down resistor and the pi can execute some code. If i can figue out how to edit the dts file and recompile to dtb to change pin 32 to an internal pull down resistor i will do it that way. otherwise i guess i am stuck.

      posted in Hardware
      Z
      zensation
    • RE: CoolPi 4B硬件扩展四:GPIO

      @george thanks for the info george...i tried adding a 2k resistor to ground on pin 32 to change it to change it from pull up to pull down as you mentioned, however that does not work and the pin voltage on 32 reads 1.034 volts. ill try other values of resistors and report which one works.

      posted in Hardware
      Z
      zensation
    • RE: CoolPi 4B硬件扩展四:GPIO

      @george and can i do the same thing with an overlay in the config.txt or something? if so how? thx

      posted in Hardware
      Z
      zensation
    • RE: CoolPi 4B硬件扩展四:GPIO

      @george ok George where can i find this file to modify?

      posted in Hardware
      Z
      zensation
    • RE: CoolPi 4B硬件扩展四:GPIO

      @george have logged into root but only see certain gpio as i still try to piece the missing parts together. How can I then change the pull up and pull down resistors for certain input pins?

      posted in Hardware
      Z
      zensation
    • RE: CoolPi 4B硬件扩展四:GPIO

      @george im trying to access the gpio because i have a custom hardware hat that needs gpio105 (pin 32) to be pulled down and i dont see any other way to pull down the input even though the documentation on the gpio page says that all IO can be set up with pull up or pull down resistors. pin 32 seems only to be pull up

      posted in Hardware
      Z
      zensation
    • RE: CoolPi 4B硬件扩展四:GPIO

      @george yes from the very start: echo 128 > /sys/class/gpio/export does not create a node

      posted in Hardware
      Z
      zensation
    • RE: CoolPi 4B硬件扩展四:GPIO

      ugh per usual on this site none of these commands work :rolls eyes:

      posted in Hardware
      Z
      zensation