mantouboji Posted May 15, 2016 Share Posted May 15, 2016 I want to build a GPS timeserver like http://rdlazaro.info/compu-Raspberry_Pi-RPi-stratum0.html I modified the kernel config to use the pps-gpio module in kernel , but since H3 linux kernel don't support device tree yet, Is there any method to assign a GPIO pin to this module ? I don't want to hard-code in the source code . Link to comment Share on other sites More sharing options...
martinayotte Posted May 15, 2016 Share Posted May 15, 2016 Why do you say that H3 doesn't support device tree yet ? It does, but not using Legacy ! But maybe you mean it doesn't support "overlays" yet ... Link to comment Share on other sites More sharing options...
mantouboji Posted May 15, 2016 Author Share Posted May 15, 2016 whatever,is there any method? Link to comment Share on other sites More sharing options...
mantouboji Posted May 16, 2016 Author Share Posted May 16, 2016 Maybe I can add a pps-gpio section in .dts file in u-boot source? Link to comment Share on other sites More sharing options...
martinayotte Posted May 16, 2016 Share Posted May 16, 2016 Yes, that is the way to do, using dtc to decompile/recompile the dtb. Link to comment Share on other sites More sharing options...
mantouboji Posted May 16, 2016 Author Share Posted May 16, 2016 Thank you for your advice. Link to comment Share on other sites More sharing options...
mantouboji Posted May 19, 2016 Author Share Posted May 19, 2016 I plug the GPS module PPS output to OPiOne's GPIO pin PG09, modify fex file to release PG09 from GPIO, and then run gpsd, PPS worked! It's very strange, no any device tree setup. Link to comment Share on other sites More sharing options...
vlad59 Posted May 19, 2016 Share Posted May 19, 2016 If you're using a fex file then you're using a old kernel 3.4.XXX. Newer kernel use DT Link to comment Share on other sites More sharing options...
mantouboji Posted May 19, 2016 Author Share Posted May 19, 2016 You're so humor. The default kernel for Armbian on H3 is 3.4.112 . At last, I found this https://github.com/infinet/bananapi.git , very amazing. Link to comment Share on other sites More sharing options...
mantouboji Posted May 21, 2016 Author Share Posted May 21, 2016 Now, It looks like this : Link to comment Share on other sites More sharing options...
StaLeWaR Posted September 5, 2016 Share Posted September 5, 2016 I do not understand how he did it ...Can somebody explain?I would like to repeat it Link to comment Share on other sites More sharing options...
mantouboji Posted September 6, 2016 Author Share Posted September 6, 2016 modify fex file like this: [uart1] uart_used = 1 uart_port = 1 # 2 for 2-wire uart_type = 2 uart_tx = port:PG06<2><1><default><default> uart_rx = port:PG07<2><1><default><default> [gpio_para] gpio_used = 1 gpio_num = 16 ... #gpio_pin_17 = port:PG09<0><default><default><0> #for UART1 #gpio_pin_18 = port:PG06<1><default><default><default> #gpio_pin_19 = port:PG07<1><default><default><default> Link to comment Share on other sites More sharing options...
StaLeWaR Posted September 6, 2016 Share Posted September 6, 2016 Thanks for the answer! With this no problems.I wanted to know how to assign a pin to PPS? use path https://github.com/infinet/bananapi as you pointed out the pin? options pps-gpio gpio_pin=PG09 or options pps-gpio gpio_pin=17 Link to comment Share on other sites More sharing options...
mantouboji Posted September 7, 2016 Author Share Posted September 7, 2016 o, PG09 is GPIO 201, so yaofei@opigps:/etc$ more modprobe.d/pps-gpio.conf #PG9 = 32*6 + 9 = 201 options pps-gpio gpio_pin=201 Link to comment Share on other sites More sharing options...
StaLeWaR Posted September 7, 2016 Share Posted September 7, 2016 Wow What is then the algorithm counting pins? PA = 0 PB = 1 PC = 2 PD = 3 PE = 4 PF = 5 PG = 6 Physical pin 18 this PC07 pin H3 PC07 = 32*2 + 7 = 71 This is the correct understanding? Link to comment Share on other sites More sharing options...
mantouboji Posted September 7, 2016 Author Share Posted September 7, 2016 Wow What is then the algorithm counting pins? PA = 0 PB = 1 PC = 2 PD = 3 PE = 4 PF = 5 PG = 6 Physical pin 18 this PC07 pin H3 PC07 = 32*2 + 7 = 71 This is the correct understanding? Yeah, you're so smart . Link to comment Share on other sites More sharing options...
StaLeWaR Posted September 7, 2016 Share Posted September 7, 2016 Thank you for your help! Link to comment Share on other sites More sharing options...
Recommended Posts