[OpenWrt-Devel] [PATCH] ramips: Setup missing gpio exports and fine-tune the memory model number.

John Crispin blogic at openwrt.org
Thu Jan 21 07:59:40 EST 2016


there are 4-5 patches all intermingled into 1 patch.

please split it up. one change per patch

	John

On 21/01/2016 13:52, John Clark wrote:
>> +            pinctrl-0;
>>> are you sure this bit is correct ?
> 
> That is there to override the setting from the parent dtsi file. One
> could argue that the parent dtsi file should not be setting up the
> function of the uart -- this should in fact be done at the dts file
> level.  We can see below in the file for the mt7620a.dtsi that this is
> not set, so there is precedence for taking it out of the dtsi.  I
> hesitated be edit the parent dtsi file as I thought this would pose a
> backward compatibility issue in CC, but perhaps this is the more
> appropriate PR for the main branch.  I am happy to resubmit the PR for
> main to do it like the dtsi for the mt7620a if you like.
> 
> https://dev.openwrt.org/browser/trunk/target/linux/ramips/dts/rt5350.dtsi
> 85                    uart at 500 {
> 86                            compatible = "ralink,rt5350-uart",
> "ralink,rt2880-uart", "ns16550a";
> 87                            reg = <0x500 0x100>;
> 88
> 89                            resets = <&rstctrl 12>;
> 90                            reset-names = "uart";
> 91
> 92                            interrupt-parent = <&intc>;
> 93                            interrupts = <5>;
> 94
> 95                            reg-shift = <2>;
> 96
> 97                            pinctrl-names = "default";
> 98                            pinctrl-0 = <&uartf_pins>;
> 99
> 100                            status = "disabled";
> 101                    };
> 
> 
> https://dev.openwrt.org/browser/trunk/target/linux/ramips/dts/mt7620a.dtsi
> 85                    uart at 500 {
> 86                            compatible = "ralink,mt7620a-uart",
> "ralink,rt2880-uart", "ns16550a";
> 87                            reg = <0x500 0x100>;
> 88
> 89                            resets = <&rstctrl 12>;
> 90                            reset-names = "uart";
> 91
> 92                            interrupt-parent = <&intc>;
> 93                            interrupts = <5>;
> 94
> 95                            reg-shift = <2>;
> 96
> 97                            status = "disabled";
> 98                    };
> 
> 
> Without clearing the pinctrl-0 in the dts file as I have in my PR, the
> parent dtsi file is asking for the uartf pins to be configured for
> function “uartf” on line 255 of the parent dtsi:
> 
>     ralink,function = "uartf";
> 
> This dtsi function competes with dts function in the pull request:
> 
>     ralink,function = "gpio uartf";
> 
> The two conflicting settings will cause a kernel error at boot time.  If
> I take the pinctrl-0; override out, we can see this conflict:
> 
> [    0.197413] pinctrl core: add 1 pinctrl maps
> [    0.197487] rt2880-pinmux pinctrl: found group selector 2 for uartf
> [    0.197526] rt2880-pinmux pinctrl: request pin 7 (io7) for 10000500.uart
> [    0.197558] rt2880-pinmux pinctrl: pin io7 already requested by
> pinctrl; cannot claim for 10000500.uart
> [    0.197895] rt2880-pinmux pinctrl: pin-7 (10000500.uart) status -22
> [    0.198130] rt2880-pinmux pinctrl: could not request pin 7 (io7) from
> group uartf  on device rt2880-pinmux
> [    0.198471] of_serial 10000500.uart: Error applying setting, reverse
> things back
> [    0.199394] 10000500.uart: ttyS0 at MMIO 0x10000500 (irq = 13,
> base_baud = 2500000) is a Palmchip BK-3103
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list