• Recent
    • Docs
    • Github
    • 百度网盘
    • Onedrive
    • Official
    • Shop
    • Register
    • Login
    1. Cool Pi For You
    2. george
    3. Best
    G
    • Profile
    • Following 0
    • Followers 4
    • Topics 67
    • Posts 864
    • Groups 2

    Posts

    Recent Best Controversial
    • CoolPi 4B硬件扩展三:I2C

      如下表所示,coolpi 4b的40PIN连接器可以引出4组I2C总线出来,其中I2C1 I2C3 I2C5是独立I2C接口,机器内部没有和其它设备复用,I2C6板子内部有接RTC时钟芯片HYM8563,地址为51H,所以外设使用I2C6端口的时候注意地址不要冲突。

      I2C位置

      序号 端口定义 描述 IO状态
      3 I2C1_SDA_M2 I2C1数据 Internal 2.2K Pull up 3.3V
      5 I2C1_SCL_M2 I2C1时钟 Internal 2.2K Pull up 3.3V
      27 I2C6_SDA_M3 I2C6数据 Internal 2.2K Pull up 3.3V
      28 I2C6_SCL_M3 I2C6时钟 Internal 2.2K Pull up 3.3V
      31 I2C3_SCL_M2 I2C3时钟 Internal 2.2K Pull up 3.3V
      33 I2C3_SDA_M2 I2C3数据 Internal 2.2K Pull up 3.3V
      35 I2C5_SCL_M2 I2C5时钟 Internal 2.2K Pull up 3.3V
      37 I2C5_SDA_M2 I2C5数据 Internal 2.2K Pull up 3.3V

      DTS配置

      设备驱动的配置方式参考I2C6节点,注意不使用I2C功能确保节点的status为disabled,否则可能会导致其它功能异常。

      &i2c1 {
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c1m2_xfer>;
      };
      
      &i2c3 {
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c3m2_xfer>;
      };
      
      &i2c5 {
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c5m2_xfer>;
      };
      
      &i2c6 {
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c6m3_xfer>;
      
      	hym8563: hym8563@51 {
      		compatible = "haoyu,hym8563";
      		reg = <0x51>;
      		#clock-cells = <0>;
      		clock-frequency = <32768>;
      		clock-output-names = "hym8563";
      		pinctrl-names = "default";
      		pinctrl-0 = <&hym8563_int>;
      		interrupt-parent = <&gpio0>;
      		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
      		status = "okay";
      	};
      
      };
      

      测试工具及方法

      git clone git://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git
      cd i2c-tools
      make -j8
      sudo make install
      root@ubuntu:/# i2cdetect -y 6
           0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
      00:                         -- -- -- -- -- -- -- -- 
      10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      50: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      70: -- -- -- -- -- -- -- --
      I2C6节点上可以扫描到地址为51H的设备,即HYM8563。工具也支持其他读写操作。可以自行研究。
      
      posted in Hardware
      G
      george
    • RE: 6.1 Kernel GPU firmware update

      @mainbord
      The efficiency of the Panthor driver is currently lower, and we look forward to future updates.

      posted in PI CM5 Laptop
      G
      george
    • CoolPi-4B硬件扩展五:PWM

      如下表所示,40pin连接器包含7个可用于输出PWM信号的GPIO,其中PIN5 PIN12共用PWM3,PIN38 PIN40共用PWM15,这两个PWM信号同一时刻只能从一个GPIO输出,不能2个GPIO同时输出,所以40PIN连接器一共有5个独立的PWM口可以同时工作 :

      序号 端口定义 描述 IO电平 设备节点
      5 GPIO0_D4 PWM3_IR_M0 TTL 3.3V /sys/class/pwm/pwmchip3
      7 GPIO1_B7 PWM13_M2 TTL 3.3V /sys/class/pwm/pwmchip13
      12 GPIO1_A7 PWM3_IR_M3 TTL 3.3V /sys/class/pwm/pwmchip3
      32 GPIO3_B1 PWM2_M1 TTL 3.3V /sys/class/pwm/pwmchip2
      36 GPIO4_B2 PWM14_M1 TTL 3.3V /sys/class/pwm/pwmchip14
      38 GPIO4_B3 PWM15_IR_M1 TTL 3.3V /sys/class/pwm/pwmchip15
      40 GPIO3_C3 PWM15_IR_M0 TTL 3.3V /sys/class/pwm/pwmchip15

      DTS配置

      PWM2口配置如下,其它接口类似,首先配置PWM接口对应的pinctrl,比如PWM2为PWM2_M1,然后使能节点即可。

      &pwm2 {
      	pinctrl-0 = <&pwm2m1_pins>;
      	status = "okay";
      };
      

      操作PWM

      • 使用 echo 命令将要操作的 PWM 编号 export,注意操作需要root权限。
      root@coolpi-4b:/# echo 0 >/sys/class/pwm/pwmchip2/export  
      /*export 之后就会生成/sys/class/pwm/pwmchip2/pwm0目录*/
      root@coolpi-4b:/sys/class/pwm/pwmchip2/pwm0# ls
      capture  duty_cycle  enable  output_type  period  polarity  power  uevent
      
      • 使用 echo 命令设置 PWM 的周期:
      echo 1000000 > /sys/class/pwm/pwmchip2/pwm0/period
      /*设置PWM一个周期的时间,单位为ns,即一个周期为1KHZ。*/
      
      • 使用 echo 命令设置 PWM 的占空比:
      echo 500000 > /sys/class/pwm/pwmchip2/pwm0/duty_cycle
      /*设置PWM一个周期中“ON”的时间,单位为ns,即占空比=duty_cycle/period=50%。*/
      
      • 使用 echo 命令使能 PWM
      echo 1 > /sys/class/pwm/pwmchip2/pwm0/enable 
      
      posted in Hardware
      G
      george
    • RE: Step by step creation of Coolpi image files

      @plumlis
      Refer to the following link to compile and install.
      https://github.com/coolpi-george/panfork.git

      posted in PI CM5 Laptop
      G
      george
    • CP4散热器模组、底壳保护板套装

      IMG_20230322_235456.jpg IMG_20230322_235321.jpg

      posted in Hardware
      G
      george
    • RE: Purchase Components only

      @Eel
      The 4K panel can only light up normally on the motherboard, but in fact, 4K will bring an increase in power consumption, which feels a bit unprofitable. I have been working hard on power consumption recently, hoping to make significant progress.

      posted in PI CM5 Laptop
      G
      george
    • RE: CoolPi 4B硬件扩展一:40PIN接口介绍

      @AugustRobot_Zou 可以的。POE供电的场景就是通过排针的5V输入的。

      posted in Hardware
      G
      george
    • GenBook-RK3588 Crowdfunding projects

      The CM5 laptop is currently crowdfunding on the CrowdSupply platform, with a new product name called GenBook-RK3588. The following improvements will be made to the current laptop product:
      444.png

      • The memory has been fully upgraded to LPDDR5X for better energy efficiency.
      • The capacity of the battery has increased, but the specific capacity of the structure is still in the evaluation stage.
      • The module language supports TPM (Trusted Platform Module).
      • The speaker effect in the audio section continues to improve and reduce background noise.
      • Optimize the overall power consumption and expect longer usage time.
      • The software supports the mainline kernel and is expected to be submitted in mid July.
      • Improvement of various Linux distributions.
        If you have any better suggestions, you can share them with us. Thank you for your support.
      posted in PI CM5 Laptop
      G
      george
    • RE: CoolPi 4B硬件扩展一:40PIN接口介绍

      @AugustRobot_Zou 按照5V 3A的标准来配置。一般散热按照12W评估。正常工作也就5W左右。

      posted in Hardware
      G
      george
    • RE: Headphone Jack

      @Momo-0
      The 3.5mm headphone jack has output and MIC functions.

      posted in PI CM5 Laptop
      G
      george
    • Step by step creation of Coolpi image files

      The partitioning situation of the Coolpi image file is as follow

      • The first partition has a size of 512M and a partition format of fat32, used to store boot- files. The default boot mode is extLinux.
      • The second partition is the file system, with different sizes depending on the distribution. The partition format is ext4. The label of the partition is writable, which needs to be consistent with the configuration information under extLinux.
        Screenshot from 2024-07-27 12-04-32.png
      • The file of the boot partition is shown in the following figure, which you can access through/ The build kernel. sh command compiles the coolpi kernel, and then the files in the out directory need to be copied to the boot partition.
        96cdbbc0-a6ba-4faa-8a41-de671af7e750-image.png
      • The content is as follows extlinux.conf,Pay special attention to the loading method of the file system, which is searched through label (writable). Of course, it can also be modified to UUID or other types.
      default Linux coolpi
      
      label Linux coolpi
      	kernel /Image
      	initrd /initrd.img
      	fdt    /rk3588-cpcm5-notebook-v20.dtb
      	append root=LABEL=writable rw rootfstype=ext4 console=ttyS0,115200n81 quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=1 irqchip.gicv3_pseudo_nmi=0 net.ifnames=0
      
      

      Start creating a mirror image

      • Create an 8GB img file using the following command. Then partition and format.
      LOOP_NUMBER=$(losetup -f)
      dd if=/dev/zero of=./coolpi.img bs=1M count=8192    
      printf 'n\np\n1\n32768\n1081343\nn\np\n2\n1081344\n16777215\nw\n' | fdisk ./coolpi.img   
      partx -a -v ./coolpi.img      
      mkfs.vfat $LOOP_NUMBER"p1"      
      echo 'yes\n' | mkfs.ext4 $LOOP_NUMBER"p2"   
      e2label  $LOOP_NUMBER"p2" writable
      
      • Copy files to boot partition,kernel-dir is the file directory corresponding to the Coolpi kernel.
      mkdir ./mnt
      mount $LOOP_NUMBER"p1" ./mnt
      cp  kernel-dir/out/* ./mnt -r
      umount  ./mnt
      
      • Create a file system, Add rc.local file to automatically expand partitions and configure some system node permissions.
      wget https://mirrors.aliyun.com/archlinuxarm/os/ArchLinuxARM-aarch64-latest.tar.gz
      mkdir ./archlinux
      tar -zxvf ArchLinuxARM-aarch64-latest.tar.gz -C ./archlinux/
      mount $LOOP_NUMBER"p2" ./mnt
      cp -rf ./archlinux/* ./mnt/ 
      tar -zxvf  kernel-dir/out/modules.tar.gz -C ./mnt/lib/
      cp ./rc.local  ./mnt/etc/
      umount ./mnt
      e2fsck -p -f $LOOP_NUMBER"p2"
      resize2fs -M $LOOP_NUMBER"p2"
      losetup -D $LOOP_NUMBER
      
      posted in PI CM5 Laptop
      G
      george
    • RE: PLEASE help, the laptop not turn on after pressing power button.

      @rtmtree
      The 8MB is SPI-NOR memory, which stores bootloader and UBOOT internally. If the disk is formatted, it will not start properly. Don't worry, just update the image again. Provide an update method later.

      Refer to the following document:
      https://github.com/coolpi-george/Docs/blob/main/cm5-notebook/update-loader.md

      posted in PI CM5 Laptop
      G
      george
    • RE: GenBook-RK3588 Crowdfunding projects

      @reukiodo
      Hardware versions after V20 can support TYPEC PD charging, but it can only be used when turned on, and only supports adapter charging when turned off.

      posted in PI CM5 Laptop
      G
      george
    • RE: Cool Pi Cm5-Laptop Linux Quick Start Guide

      @yfblock
      Is your machine currently unable to enter UMS mode? It is possible that the file system of EMMC is damaged. You can find a USB drive and create an image of Ubuntu to it. Then, start the system from the USB drive and format EMMC in the system. Use the following command:

      sudo mkfs.ext4 /dev/mmcblk0
      
      posted in PI CM5 Laptop
      G
      george
    • RE: Cool Pi Cm5-Laptop Linux Quick Start Guide

      @yfblock
      Test several USB drives and find a USB 2.0 interface drive. There may be compatibility issues with USB3.0.

      posted in PI CM5 Laptop
      G
      george
    • 1 / 1