adafruit / Adafruit_Blinka

Add CircuitPython hardware API and libraries to MicroPython & CPython devices
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux
MIT License
453 stars 340 forks source link

Add constants and board selection for Orange Pi 5 Plus #742

Closed Barbarian-5215 closed 10 months ago

Barbarian-5215 commented 10 months ago

I based the new module OrangePi5Plus.py on documentation provided by Orange Pi, from it's wiki page for the 5 plus. I am confident of the the GPIO mappings, but less so with the UART, I2C, PWM settings, as they match the Orange Pi values provided, but seem to conflict with the values in src/adafruit_blinka/microcontroller/rockchip/rk3588/pin.py.

makermelissa commented 10 months ago

Waiting on https://github.com/adafruit/Adafruit_Python_PlatformDetect/pull/327 to be merged and released...

drozdi70 commented 10 months ago

as in #692 I guess pin.py file should be also adjusted.... :) orange pi 5 uses RK3588S , orange pi 5 plus uses RK3588

makermelissa commented 10 months ago

@drozdi70 I'm a little unclear on your suggestion. Are you saying:

  1. We should make a RK3588S pin.py file for the Orange Pi 5?
  2. Or that the current RK3588 pin.py file is incorrectly named and is actually supposed to be for the RK3588S and we need a correct RK3588S pin.py file?
  3. Something else?
drozdi70 commented 10 months ago

HiIm saying that pin.py file works only for orange pi 5 board.For orange pi 5 plus is incorrect. that's why as workaround I replace such a file with mine as in #692:sudo cp -f orangepi5plus.py /usr/local/lib/python3.11/dist-packages/adafruit_blinka/board/orangepi/orangepi5.py sudo cp -p pin5plus.py /usr/local/lib/python3.11/dist-packages/adafruit_blinka/microcontroller/rockchip/rk3588/pin.pyhow do you discover board_id is ORANGE_PI_5_PLUS not ORANGE_PI_5?on my orange pi 5 plus when I run your @.:~/work$ sudo python3 blinka_test.pyHello blinka!Board id is:  ORANGE_PI_5Digital IO ok!I2C  bus 2 ok!I2C default 2 ok!SPI @.:~/work$ more blinka_test.pyimport boardimport digitalioimport busioimport sysimport adafruit_platformdetect.constants.boards as ap_boardfrom adafruit_blinka.agnostic import board_id, detectorprint("Hello blinka!")print("Board id is: ",board_id)# Try to great a Digital input#pin = digitalio.DigitalInOut(board.PA6) --not needed nowprint("Digital IO ok!")# Try to create an I2C devicei2c = busio.I2C(board.I2C2_SCL_M0, board.I2C2_SDA_M0)print("I2C  bus 2 ok!")i2c = busio.I2C(board.SCL, board.SDA)print("I2C default 2 ok!")# Try to create an SPI device#spi = busio.SPI(board.SCLK, board.MOSI, board.MISO) --not needed nowprint("SPI ok!")print("done!")RegardsRobertTemat: Re: [adafruit/Adafruit_Blinka] Add constants and board selection for Orange Pi 5 Plus (PR #742)Data: 2023-11-29 21:10Nadawca: "Melissa LeBlanc-Williams" @.>Adresat: "adafruit/Adafruit_Blinka" @.>; DW: "DroZDi" @.>; "Mention" @.>;

@drozdi70 I'm a little unclear on your suggestion. Are you saying:

We should make a RK3588S pin.py file for the Orange Pi 5? Or that the current RK3588 pin.py file is incorrectly names and is actually supposed to be for the RK3588S and we need a correct RK3588S pin.py file? Something else?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

makermelissa commented 10 months ago

Hi Im saying that pin.py file works only for orange pi 5 board.For orange pi 5 plus is incorrect. that's why as workaround I replace such a file with mine as in #692:sudo cp -f orangepi5plus.py /usr/local/lib/python3.11/dist-packages/adafruit_blinka/board/orangepi/orangepi5.py sudo cp -p pin5plus.py /usr/local/lib/python3.11/dist-packages/adafruit_blinka/microcontroller/rockchip/rk3588/pin.pyhow do you discover board_id is ORANGE_PI_5_PLUS not ORANGE_PI_5?on my orange pi 5 plus when I run your @.:~/work$ sudo python3 blinka_test.pyHello blinka!Board id is:  ORANGE_PI_5Digital IO ok!I2C  bus 2 ok!I2C default 2 ok!SPI @.:~/work$ more blinka_test.pyimport boardimport digitalioimport busioimport sysimport adafruit_platformdetect.constants.boards as ap_boardfrom adafruit_blinka.agnostic import board_id, detectorprint("Hello blinka!")print("Board id is: ",board_id)# Try to great a Digital input#pin = digitalio.DigitalInOut(board.PA6) --not needed nowprint("Digital IO ok!")# Try to create an I2C devicei2c = busio.I2C(board.I2C2_SCL_M0, board.I2C2_SDA_M0)print("I2C  bus 2 ok!")i2c = busio.I2C(board.SCL, board.SDA)print("I2C default 2 ok!")# Try to create an SPI device#spi = busio.SPI(board.SCLK, board.MOSI, board.MISO) --not needed nowprint("SPI ok!")print("done!")RegardsRobertTemat: Re: [adafruit/Adafruit_Blinka] Add constants and board selection for Orange Pi 5 Plus (PR #742)Data: 2023-11-29 21:10Nadawca: "Melissa LeBlanc-Williams" @.>Adresat: "adafruit/Adafruit_Blinka" @.>; DW: "DroZDi" @.>; "Mention" @.>; @drozdi70 I'm a little unclear on your suggestion. Are you saying: We should make a RK3588S pin.py file for the Orange Pi 5? Or that the current RK3588 pin.py file is incorrectly names and is actually supposed to be for the RK3588S and we need a correct RK3588S pin.py file? Something else? —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Ok, sounds like the second option I mentioned.