[Letux-kernel] Letux-kernel on OpenPandora

Belisko Marek marek.belisko at gmail.com
Sun Jun 18 20:57:42 CEST 2017


Hi Nikolaus,

great you spot a bug. I plan to look on older versions today (was
whole weekend without internet access).
So I can focus on something else ;). Thanks.

On Sun, Jun 18, 2017 at 6:54 PM, H. Nikolaus Schaller <hns at goldelico.com> wrote:
> Hi,
>
>> Am 18.06.2017 um 17:29 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>>
>>
>>>
>>> Maybe I should also dump_stack() to see who calls pinctrl_select_state().
>>
>> Here it is:
>>
>> [    2.731231] pinctrl-single 48002030.pinmux: 284 pins at pa fa002030 size 568
>> [    2.740325] pinctrl_select_state:
>> [    2.743957] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc5-letux+ #1131
>> [    2.751434] Hardware name: Generic OMAP3 (Flattened Device Tree)
>> [    2.757751] [<c010f478>] (unwind_backtrace) from [<c010b9bc>] (show_stack+0x10/0x14)
>> [    2.765869] [<c010b9bc>] (show_stack) from [<c04406c4>] (dump_stack+0x98/0xd0)
>> [    2.773437] [<c04406c4>] (dump_stack) from [<c046feac>] (pinctrl_select_state+0x20/0x170)
>> [    2.781982] [<c046feac>] (pinctrl_select_state) from [<c0471194>] (pinctrl_enable+0x98/0x210)
>> [    2.790893] [<c0471194>] (pinctrl_enable) from [<c0475780>] (pcs_probe+0x6ec/0x7a8)
>> [    2.798889] [<c0475780>] (pcs_probe) from [<c04ec0b4>] (platform_drv_probe+0x50/0xa0)
>> [    2.807098] [<c04ec0b4>] (platform_drv_probe) from [<c04ea0ec>] (driver_probe_device+0x150/0x2d0)
>> [    2.816345] [<c04ea0ec>] (driver_probe_device) from [<c04ea2f4>] (__driver_attach+0x88/0xac)
>> [    2.825164] [<c04ea2f4>] (__driver_attach) from [<c04e87f8>] (bus_for_each_dev+0x6c/0x90)
>> [    2.833709] [<c04e87f8>] (bus_for_each_dev) from [<c04e97d8>] (bus_add_driver+0xcc/0x1e8)
>> [    2.842254] [<c04e97d8>] (bus_add_driver) from [<c04eb298>] (driver_register+0x9c/0xe0)
>> [    2.850616] [<c04eb298>] (driver_register) from [<c0101938>] (do_one_initcall+0xa8/0x150)
>> [    2.859161] [<c0101938>] (do_one_initcall) from [<c0b00d88>] (kernel_init_freeable+0x128/0x1f0)
>> [    2.868255] [<c0b00d88>] (kernel_init_freeable) from [<c0759204>] (kernel_init+0x8/0x10c)
>> [    2.876800] [<c0759204>] (kernel_init) from [<c01070f0>] (ret_from_fork+0x14/0x24)
>> [    2.885772] pinctrl_select_state: 48002030.pinmux 2
>> [    2.891296] pinmux_enable_setting:
>> [    2.894989] pinmux_enable_setting: alloc 0
>> [    2.899658] pinmux_enable_setting: alloc 1
>> [    2.903991] pinmux_enable_setting: alloc 2
>> [    2.908477] pinmux_enable_setting: alloc 3
>> [    2.912811] pinmux_enable_setting: alloc 4
>> [    2.917114] pinmux_enable_setting: alloc 5
>> [    2.921600] pinmux_enable_setting: alloc 6
>> [    2.925933] pinmux_enable_setting: alloc 7
>> [    2.930389] pinmux_enable_setting: set 0 PIN210
>> [    2.935180] pinmux_enable_setting: set 1 PIN211
>> [    2.940093] pinmux_enable_setting: set 2 PIN212
>> [    2.944854] pinmux_enable_setting: set 3 PIN213
>> [    2.949768] pinmux_enable_setting: set 4 PIN214
>> [    2.954559] pinmux_enable_setting: set 5 PIN215
>> [    2.959472] pinmux_enable_setting: set 6 PIN181
>> [    2.964233] pinmux_enable_setting: set 7 PIN182
>> [    2.969146] pinmux_enable_setting: set mux
>> [    2.973785] pcs_set_mux: write 10b to fa0021d4
>> [    2.978698] pcs_set_mux: write 10b to fa0021d6
>> [    2.983398] pcs_set_mux: write 10b to fa0021d8
>> [    2.988098] pcs_set_mux: write 10b to fa0021da
>> [    2.992919] pcs_set_mux: write 10b to fa0021dc
>> [    2.997619] pcs_set_mux: write 10b to fa0021de
>> [    3.002441] pcs_set_mux: write 11c to fa00219a
>> [    3.007141] pcs_set_mux: write 4 to fa00219c
>> [    3.011779] pinmux_enable_setting: done (0)
>> [    3.011779]
>> [    3.011779]
>> [    3.019561] pinctrl_select_state: 48002030.pinmux 2
>> [    3.024688] pinmux_enable_setting:
>> [    3.028533] pinmux_enable_setting: alloc 0
>> [    3.032867] pinmux_enable_setting: alloc 1
>> [    3.037170] pinmux_enable_setting: alloc 2
>> [    3.041656] pinmux_enable_setting: alloc 3
>> [    3.045989] pinmux_enable_setting: alloc 4
>> [    3.050445] pinmux_enable_setting: alloc 5
>> [    3.054779] pinmux_enable_setting: set 0 PIN2
>> [    3.059509] pinmux_enable_setting: set 1 PIN3
>> [    3.064117] pinmux_enable_setting: set 2 PIN4
>> [    3.068847] pinmux_enable_setting: set 3 PIN9
>> [    3.073425] pinmux_enable_setting: set 4 PIN10
>> [    3.078124] pinmux_enable_setting: set 5 PIN11
>> [    3.082946] pinmux_enable_setting: set mux
>> [    3.087280] pcs_set_mux: write 10c to fa002034
>> [    3.092102] pcs_set_mux: write 4 to fa002036
>> [    3.096618] pcs_set_mux: write 4 to fa002038
>> [    3.101257] `cs_cet_eux: wride 1 4 tg fa 020$2
>> [    3.105957] pcs_cet_eux: wride 4 to fa00"044
>>
>> The character errors in the last 2 lines look like some power supply fading away.
>> I think we have to study the Pandora Schematics...
>>
>> If the pinmux registers address fa002034 really translate to 48002034 etc. this
>> would write to the SDRC mode registers...
>>
>> The question is why the GTA04 works.
>>
>> Here the same sequence on GTA04:
>>
>> [    2.327301] pinctrl-single 48002030.pinmux: 284 pins at pa fa002030 size 568
>> [    2.336151] pinctrl_select_state:
>> [    2.340087] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc5-letux+ #1131
>> [    2.347534] Hardware name: Generic OMAP36xx (Flattened Device Tree)
>> [    2.354125] [<c010f478>] (unwind_backtrace) from [<c010b9bc>] (show_stack+0x10/0x14)
>> [    2.362213] [<c010b9bc>] (show_stack) from [<c04406c4>] (dump_stack+0x98/0xd0)
>> [    2.369750] [<c04406c4>] (dump_stack) from [<c046feac>] (pinctrl_select_state+0x20/0x170)
>> [    2.378295] [<c046feac>] (pinctrl_select_state) from [<c0471194>] (pinctrl_enable+0x98/0x210)
>> [    2.387176] [<c0471194>] (pinctrl_enable) from [<c0475780>] (pcs_probe+0x6ec/0x7a8)
>> [    2.395172] [<c0475780>] (pcs_probe) from [<c04ec0b4>] (platform_drv_probe+0x50/0xa0)
>> [    2.403320] [<c04ec0b4>] (platform_drv_probe) from [<c04ea0ec>] (driver_probe_device+0x150/0x2d0)
>> [    2.412567] [<c04ea0ec>] (driver_probe_device) from [<c04ea2f4>] (__driver_attach+0x88/0xac)
>> [    2.421356] [<c04ea2f4>] (__driver_attach) from [<c04e87f8>] (bus_for_each_dev+0x6c/0x90)
>> [    2.429870] [<c04e87f8>] (bus_for_each_dev) from [<c04e97d8>] (bus_add_driver+0xcc/0x1e8)
>> [    2.438415] [<c04e97d8>] (bus_add_driver) from [<c04eb298>] (driver_register+0x9c/0xe0)
>> [    2.446746] [<c04eb298>] (driver_register) from [<c0101938>] (do_one_initcall+0xa8/0x150)
>> [    2.455291] [<c0101938>] (do_one_initcall) from [<c0b00d88>] (kernel_init_freeable+0x128/0x1f0)
>> [    2.464355] [<c0b00d88>] (kernel_init_freeable) from [<c0759204>] (kernel_init+0x8/0x10c)
>> [    2.472869] [<c0759204>] (kernel_init) from [<c01070f0>] (ret_from_fork+0x14/0x24)
>> [    2.481597] pinctrl_select_state: 48002030.pinmux 2
>> [    2.486724] pinmux_enable_setting:
>> [    2.490692] pinmux_enable_setting: alloc 0
>> [    2.495025] pinmux_enable_setting: alloc 1
>> [    2.499572] pinmux_enable_setting: alloc 2
>> [    2.503906] pinmux_enable_setting: alloc 3
>> [    2.508209] pinmux_enable_setting: alloc 4
>> [    2.512634] pinmux_enable_setting: alloc 5
>> [    2.516937] pinmux_enable_setting: set 0 PIN210
>> [    2.521820] pinmux_enable_setting: set 1 PIN211
>> [    2.526580] pinmux_enable_setting: set 2 PIN212
>> [    2.531433] pinmux_enable_setting: set 3 PIN213
>> [    2.536193] pinmux_enable_setting: set 4 PIN214
>> [    2.541046] pinmux_enable_setting: set 5 PIN215
>> [    2.545806] pinmux_enable_setting: set mux
>> [    2.550476] pcs_set_mux: write 10b to fa0021d4
>> [    2.555206] pcs_set_mux: write 10b to fa0021d6
>> [    2.559997] pcs_set_mux: write 10b to fa0021d8
>> [    2.564666] pcs_set_mux: write 10b to fa0021da
>> [    2.569458] pcs_set_mux: write 10b to fa0021dc
>> [    2.574127] pcs_set_mux: write 10b to fa0021de
>> [    2.578796] pinmux_enable_setting: done (0)
>> [    2.578796]
>> [    2.578796]
>> [    2.586517] pinctrl_select_state: ok
>> [    2.591552] pinctrl-single 48002a00.pinmux: 46 pins at pa fa002a00 size 92
>> [    2.600616] pinctrl-single 480025a0.pinmux: 46 pins at pa fa0025a0 size 92
>> [    2.608001] pinctrl_select_state:
>> [    2.611785] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc5-letux+ #1131
>> [    2.619232] Hardware name: Generic OMAP36xx (Flattened Device Tree)
>> [    2.625793] [<c010f478>] (unwind_backtrace) from [<c010b9bc>] (show_stack+0x10/0x14)
>> [    2.633880] [<c010b9bc>] (show_stack) from [<c04406c4>] (dump_stack+0x98/0xd0)
>> [    2.641418] [<c04406c4>] (dump_stack) from [<c046feac>] (pinctrl_select_state+0x20/0x170)
>> [    2.649963] [<c046feac>] (pinctrl_select_state) from [<c0471194>] (pinctrl_enable+0x98/0x210)
>> [    2.658843] [<c0471194>] (pinctrl_enable) from [<c0475780>] (pcs_probe+0x6ec/0x7a8)
>> [    2.666839] [<c0475780>] (pcs_probe) from [<c04ec0b4>] (platform_drv_probe+0x50/0xa0)
>> [    2.675018] [<c04ec0b4>] (platform_drv_probe) from [<c04ea0ec>] (driver_probe_device+0x150/0x2d0)
>> [    2.684234] [<c04ea0ec>] (driver_probe_device) from [<c04ea2f4>] (__driver_attach+0x88/0xac)
>> [    2.693023] [<c04ea2f4>] (__driver_attach) from [<c04e87f8>] (bus_for_each_dev+0x6c/0x90)
>> [    2.701538] [<c04e87f8>] (bus_for_each_dev) from [<c04e97d8>] (bus_add_driver+0xcc/0x1e8)
>> [    2.710083] [<c04e97d8>] (bus_add_driver) from [<c04eb298>] (driver_register+0x9c/0xe0)
>> [    2.718414] [<c04eb298>] (driver_register) from [<c0101938>] (do_one_initcall+0xa8/0x150)
>> [    2.726959] [<c0101938>] (do_one_initcall) from [<c0b00d88>] (kernel_init_freeable+0x128/0x1f0)
>> [    2.736022] [<c0b00d88>] (kernel_init_freeable) from [<c0759204>] (kernel_init+0x8/0x10c)
>> [    2.744537] [<c0759204>] (kernel_init) from [<c01070f0>] (ret_from_fork+0x14/0x24)
>> [    2.752593] pinctrl_select_state: 480025a0.pinmux 2
>> [    2.757720] pinmux_enable_setting:
>> [    2.761505] pinmux_enable_setting: alloc 0
>> [    2.765808] pinmux_enable_setting: alloc 1
>> [    2.770233] pinmux_enable_setting: alloc 2
>> [    2.774566] pinmux_enable_setting: alloc 3
>> [    2.778869] pinmux_enable_setting: alloc 4
>> [    2.783264] pinmux_enable_setting: alloc 5
>> [    2.787597] pinmux_enable_setting: set 0 PIN40
>> [    2.792358] pinmux_enable_setting: set 1 PIN41
>> [    2.797027] pinmux_enable_setting: set 2 PIN42
>> [    2.802368] random: fast init done
>> [    2.806121] pinmux_enable_setting: set 3 PIN43
>> [    2.810913] pinmux_enable_setting: set 4 PIN44
>> [    2.815582] pinmux_enable_setting: set 5 PIN45
>> [    2.820373] pinmux_enable_setting: set mux
>> [    2.824676] pcs_set_mux: write 3 to fa0025f0
>> [    2.829284] pcs_set_mux: write 3 to fa0025f2
>> [    2.833770] pcs_set_mux: write 10b to fa0025f4
>> [    2.838439] pcs_set_mux: write 10b to fa0025f6
>> [    2.843200] pcs_set_mux: write 10b to fa0025f8
>> [    2.847900] pcs_set_mux: write 10b to fa0025fa
>> [    2.852661] pinmux_enable_setting: done (0)
>>
>> What is the difference? There are no writes to PIN2,3,4 and similarily low numbers.
>>
>> Ideas where to look next:
>> 1. missing IOPAD macros (which could hide changed address calculations)
>> 2. pinmux assigned to &omap3_pmx_core instead of &omap3_pmx_core2
>
> looks as if I have found it by good luck :) (and good look).
>
> There is a reference to &control_pins in &omap3_pmx_core but that one is
> duplicated in &omap3_pmx_core2 and only belongs there.
>
> So it appears as if omap3_pmx_core tried to apply omap3_pmx_core2 settings.
>
> All this is part of quite old non-upstream patches for properly defining
> hsusb2 pinmux.
>
> iMac:master hns$ git blame arch/arm/boot/dts/omap3-pandora-common.dtsi | fgrep '&control_pins'
> Verarbeite Zeilen: 100% (789/789), Fertig.
> 73d2b02177c33 arch/arm/boot/dts/omap3-pandora-common.dtsi (H. Nikolaus Schaller     2015-02-12 09:10:34 +0100 290)              &control_pins
> iMac:master hns$ git log --oneline -30 arch/arm/boot/dts/omap3-pandora-common.dtsi
> 078e18116632 Merge branches 'work/hns/letux/rootfs', 'extern/forward-ports', 'work/hacks', 'work/josua/debian-build', 'work/hns/input/tsc2007-v10', 'work/hns/power/twl4030_charger-v6-old', 'work/hns/usb/misc/usb3503', 'work/hns/dt/gta04', 'work/hns/dt/gta04a5', 'work/hns/dt/pandora-v2', 'work/hns/dt/omap5-common-v3', 'work/hns/dt/omap5-uevm-v4', 'work/hns/dt/pyra', 'work/hns/dt/lc8', 'work/hns/misc/wwan', 'work/hns/misc/w2sg-serdev-v2', 'work/hns/omapdss/tvfix-v3', 'work/hns/video/dss/displayprobing', 'work/hns/power/bq27xxx', 'work/marek/generic-adc-battery-v2', 'work/kemnade/charging_fixes', 'work/kemnade/musb-fixes', 'work/kemnade/phy-twl', 'work/hns/iio-input-bridge', 'work/hns/extcon', 'work/hns/hwmon-fixes', 'work/hns/mtd/onenand', 'work/kemnade/wifi-sdio-fixes-v3', 'work/hns/codec/twl4030', 'work/hns/input/as5013', 'work/andrey/input/as5013', 'work/hns/power/bq2429x', 'work/hns/sound/ts3a225e', 'work/hns/mmc/txs02612', 'work/hns/video/ov9655', 'work/hns/input/crtouch-v2', 'work/hns/mips/mini-pm', 'work/hns/mips/minibook', 'extern/bno055', 'work/marek/am335x-hwmon', 'work/hns/video/dss/panels+ssd2858', 'extern/sgx544-v2', 'extern/mvduin/patch/tiler-fbdev-v2' and 'work/hns/hw-test' into letux-4.12-rc5
> 1b0759554c22 DT: openpandora: support mma7455 accelerometer
> 51268f18526e DT: openpandora: venc fix
> 1202b505cff0 DT:omap3+ads7846: use new common touchscreen bindings
> abea15a8625a Merge tag 'v4.9-rc1' into letux-base
> 81777ff9dde7 ARM: dts: omap3: Add missing unit name to memory nodes
> 08ef98069718 ARM: dts: omap3/4/5/dra7: remove unneeded unit name for gpio-leds nodes
> 58c0cdf1ae2e Merge tag 'v4.8-rc1' into letux-base
> f82bc163b715 ARM: dts: omap3-pandora-common: remove unneded unit name
> 631040957e84 Merge tag 'v4.6-rc1' into letux-base
> 44e4716499b8 ARM: dts: omap3: Fix NAND device nodes
> 6c0840f89a2e Merge tag 'v4.5-rc1' into letux-base
> 0c4d63b323c8 ARM: dts: omap: replace legacy *,wakeup property with wakeup-source
> 4f0fd3a2e6a4 Merge tag 'v4.4-rc1' into 4.4-rc1
> 3a637e008e54 ARM: dts: Use defined GPIO constants in flags cell for OMAP2+ boards
> 5f400fc63e6f DT: fixed our Pandora extensions to boot and better merge witn mainline
> 5adafdcf09fb merge tag 'v4.3-rc1'
> f9d50fef4b64 ARM: OMAP2+: omap3-pandora: add wifi support
> f7c57f8c7b46 ARM: dts: omap3-pandora: add support for usb host and 32k buffer
> a4e1adb98f73 ARM: dts: omap3-pandora: miscellaneous corrections
> 8b5d4d183697 Merge tag 'v4.1-rc1'
> 771048f59d06 ARM: dts: omap3-pandora: add common device tree
> 98ba4f646c97 ARM dts omap3-pandora: fixed pinmux to always use the macros
> 73d2b02177c3 ARM dts omap3-pandora: hsusb2 phy understands only one gpio; add hsusb2_power regulator; add proper pinmux for hsusb2 data
> ^^^ here it is added in a non-upstream patch
> d2f8622274c7 ARM dts omap3-pandora: permanently enable VSIM or the LID sensor wont work
> 9c7e290d41a7 ARM dts omap3-pandora: fix gpio-key for lid to send a SW_LID switch event and not a key event
> 5d1d9f7d1601 gta04 dt pandora: renamed file for 600MHz variant
> c845bea83aa3 gta04 dt pandora: cosmetics to make it easier upstreamable
> 106fbda1ea01 gta04 DT: pandora: disable gpio LEDs connected through twl4030 because they make the kernel panic
> 97abef675c1e gta04 dt pandora: corrected panel definition (panel has its own driver)
> iMac:master hns$
>
> It has still to be excavated from letux-base into a separate feature
> branch so that we can start upstreaming Pandora patch sets...
>
>
> Why did it work before? Most likely because the address calculation or
> some pinmux checks have changed recently.
>
> Anyways I will add a patch to -rc6 (planned for tomorrow) so that we can
> also boot the Pandora with the latest kernel. And I can test the
> twl4030-charger patches.
>
>
> BR,
> Nikolaus
>
>> 3. wrong mix of OMAP3_CORE1_IOPAD and OMAP3_CORE2_IOPAD
>>
>> BR,
>> Nikolaus
>>
>>
>> _______________________________________________
>> http://projects.goldelico.com/p/gta04-kernel/
>> Letux-kernel mailing list
>> Letux-kernel at openphoenux.org
>> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel
>

BR,

marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com


More information about the Letux-kernel mailing list