Jump to content

ning

Members
  • Posts

    329
  • Joined

  • Last visited

Posts posted by ning

  1. after read spec, 7 SEG pins for 7 LEDs (LAN, WIFI...etc) and 4 DIG pins control 4 digital.

     

    5 DIG pins are controlled by 66h~6eh, while 4 digitals

     

    how to control seg pins? use 1 DIG pin? I guess Yes. each digital has 7 LEDs, and there also 7 Seg LED.

     

    write number to DIG register, at least 1 LED will on.

     

    OK. 1 DIG pin controls 1 digtal, and each digital has 7 seg, 1 seg connects to 1 SEG pin.  there are 5 digitals (one virtual), and they share SEG pins.

     

    So let me check VDD.

  2. it's on i2c4. I don't see I2c error during probe. please let me know what to do next!

     

    &i2c4 {
            status = "okay";
    
            vfd@24 {
                    compatible = "fdhisi,fd6551";
                    reg = <0x24>;
    
                    tm16xx,digits = [04 03 02 01];
                    tm16xx,segment-mapping = [03 01 02 06 04 05 00];
    
                    #address-cells = <2>;
                    #size-cells = <0>;
    
                    led@0,0 {
                            reg = <0 0>;
                            function = LED_FUNCTION_ALARM;
                    };
    
                    led@0,1 {
                            reg = <0 1>;
                            function = LED_FUNCTION_USB;
                    };
    
                    led@0,3 {
                            reg = <0 3>;
                            function = "play";
                    };
    
                    led@0,2 {
                            reg = <0 2>;
                            function = "pause";
                    };
    
                    led@0,4 {
                            reg = <0 4>;
                            function = "colon";
                    };
    
                    led@0,5 {
                            reg = <0 5>;
                            function = LED_FUNCTION_LAN;
                    };
    
                    led@0,6 {
                            reg = <0 6>;
                            function = LED_FUNCTION_WLAN;
                    };
            };
    };

     

  3. you need to develop your dtbo to support your addon devices.

     

    from your description, your device needs a set of SPI pins, and a reset pin.

    1574068610_.png.68c2465c4155018bef919af6f9385769.png

     

    OPI PC plus already provides the pins you want.

     

    MOSI     SPI0_MOSI / GPIO10 (PIN 19)
    MISO     SPI0_MISO / GPIO9 (PIN 21)
    SCK     SPI0_SCLK / GPIO11 (PIN 23)
    NSS/Enable     SPI0_CE0_N / GPIO8 (PIN 24)

     

    then, you need develop a dtbo for your device.

     

    156 &spi0 {
    157         status = "okay";
    158 
    159         YOUR_DEVICE@0 {
    160                 compatible = "YOUR_DEVICE";
    161                 reg = <0>;
    162                 spi-max-frequency = <50000000>;
    163         };
    164 };

     

    if your device use an userspace driver, that not need YOUR_DEVICE@0 node.

     

    that all you need to do.

  4. you want to add a 2 pin fan to opi5, unfortunitly, PWM port is IO port, it doesn't have enough power to driver your fan, thus would break the GPIO bank, and make whole bank unfunction.

     

    thus suggest to directly use 5V power pin.

     

    if you have 3 pin fan, you can use a PWM pin to control it speed. in this case, you need write dts code to enable it.

     

  5. you can't use GPIO as power supply for fan, this will break the gpio bank.

     

    you can use GPIO as ON/OFF switch for fan, you should use "gpio-fan" driver.

     

    https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/bindings/hwmon/gpio-fan.txt?h=v6.7.8

     

    by this you can use /sys/class/thermal/cooling_deviceX/state control you fan, but if you want to system automatically enable your fan at certan temperature,

    you need register the fan as a cooling device, for cpu/gpu or hard driver.

     

    https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/bindings/thermal/thermal-cooling-devices.yaml

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines