Jump to content

olimex a10 > i2c


bellad

Recommended Posts

hello,

i want use ds2482-100 i2c-> 1wire maxim , but i not see with i2cdetect -y 0

in script.bin :


[twi_para]
twi_port = 0
twi_scl = port:PB00<2><default><default><default>
twi_sda = port:PB01<2><default><default><default>

--

[twi0_para]
twi0_used = 1
twi0_scl = port:PB00<2><default><default><default>
twi0_sda = port:PB01<2><default><default><default>

[twi1_para]
twi1_used = 0
twi1_scl = port:PB18<2><default><default><default>
twi1_sda = port:PB19<2><default><default><default>

[twi2_para]
twi2_used = 0
twi2_scl = port:PB20<2><default><default><default>
twi2_sda = port:PB21<2><default><default><default>

i have plug PB00 and PB01

Linux lime-a10 4.1.6-sunxi #22 SMP Tue Aug 25 17:54:51 CEST 2015 armv7l GNU/Linux

modprobe ?? what ??

thank you for your help

Link to comment
Share on other sites

script.bin (script.fex) is Allwinner way of structure for describing hardware, DTB (DTS for source) is for (probably) all others.

 

You need to convert 

sun4i-a10-olinuxino-lime.dtb 

to source, edit 

sun4i-a10-olinuxino-lime.dts

and back.

 

http://events.linuxfoundation.org/sites/events/files/slides/petazzoni-device-tree-dummies.pdf

http://elinux.org/Device_Tree

Link to comment
Share on other sites

in sun4i-a10-olinuxino-lime.dts

i2c0@0 {
                allwinner,pins = "PB0", "PB1";
                allwinner,function = "i2c0";
                allwinner,drive = <0x0>;
                allwinner,pull = <0x0>;
                linux,phandle = <0x2a>;
                phandle = <0x2a>;
            };

i2c@01c2ac00 {
            compatible = "allwinner,sun4i-a10-i2c";
            reg = <0x1c2ac00 0x400>;
            interrupts = <0x7>;
            clocks = <0x28 0x0>;
            status = "okay";
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            pinctrl-names = "default";
            pinctrl-0 = <0x2a>;

it's ok ??

setenv bootargs console=tty1 root=/dev/sda1 rootwait rootfstype=ext4 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 enforcing=0 loglevel=1
#--------------------------------------------------------------------------------------------------------------------------------
# Boot loader script to boot with different boot methods for old and new kernel
#--------------------------------------------------------------------------------------------------------------------------------
if ext4load mmc 0 0x00000000 /boot/.next || fatload mmc 0 0x00000000 .next
then
# sunxi mainline kernel
#--------------------------------------------------------------------------------------------------------------------------------
ext4load mmc 0 0x49000000 /boot/dtb/${fdtfile} || fatload mmc 0 0x49000000 /dtb/${fdtfile}
ext4load mmc 0 0x46000000 /boot/zImage || fatload mmc 0 0x46000000 zImage
env set fdt_high ffffffff
bootz 0x46000000 - 0x49000000
#--------------------------------------------------------------------------------------------------------------------------------
else
# sunxi android kernel
#--------------------------------------------------------------------------------------------------------------------------------
ext4load mmc 0 0x43000000 /boot/script.bin || fatload mmc 0 0x43000000 script.bin
ext4load mmc 0 0x48000000 /boot/zImage || fatload mmc 0 0x48000000 zImage
bootz 0x48000000
#--------------------------------------------------------------------------------------------------------------------------------
fi
# Recompile with:
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

i must modify the boot.scr ?

Link to comment
Share on other sites

oh , sorry , it's my fault , bad plug my i2c ic ds2482-100

but , thank you so much for " script.bin (script.fex) is Allwinner way of structure for describing hardware, DTB (DTS for source) is for (probably) all others. " and the link's

I learned a lot

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines