diff mbox series

[2/4] arm64: dts: mediatek: mt7986: add gpio-hog for boot mode switch on BPI-R3

Message ID 20240627075856.2314804-3-leith@bade.nz (mailing list archive)
State New, archived
Headers show
Series fix up pin definitions for BPI-R3 board | expand

Commit Message

Leith Bade June 27, 2024, 7:58 a.m. UTC
To avoid future pin conflicts with the boot mode dip switch (SW1), add
a gpio-hog to document the two GPIOs it is connected to. If another device
attempts to then claim the pins a log message will get printed.

The BPI-R3 has a four position DIP switch (labelled SW1), that is used to
configure the boot mode. The first two positions (labelled A & B)
configure two bootstrap pins on the MT7986 that select which flash chip
the boot ROM will load the second stage bootloader from. The third
position toggles chip select lines to select between the NOR or NAND chip
on the SPI0 bus. The fourth position toggles chip select lines to select
between the eMMC chip or SD card on the MMC0 bus.

Only the first two positions are connected to GPIO pins on the MT7986. In
the public schematic for the BPI-R3 (titled "BPI-R3-MT7986A",
revision "V1.1", sheet 4), these are the MT7986 (U1E) pins GPIO_0 (GPIO5)
and GPIO_1 (GPIO6). This gpio-hog configures the two boot mode pins as
inputs.

Signed-off-by: Leith Bade <leith@bade.nz>
---
 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

kernel test robot July 3, 2024, 11:39 a.m. UTC | #1
Hi Leith,

kernel test robot noticed the following build warnings:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v6.10-rc6 next-20240703]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Leith-Bade/arm64-dts-mediatek-mt7986-fix-the-switch-reset-line-on-BPI-R3/20240628-001353
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20240627075856.2314804-3-leith%40bade.nz
patch subject: [PATCH 2/4] arm64: dts: mediatek: mt7986: add gpio-hog for boot mode switch on BPI-R3
config: arm64-randconfig-051-20240703 (https://download.01.org/0day-ci/archive/20240703/202407031954.bBLv9YRp-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
dtschema version: 2024.6.dev3+g650bf2d
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240703/202407031954.bBLv9YRp-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407031954.bBLv9YRp-lkp@intel.com/

dtcheck warnings: (new ones prefixed by >>)
   arch/arm64/boot/dts/mediatek/mt7986a.dtsi:431.19-445.5: Warning (simple_bus_reg): /soc/t-phy: missing or empty reg/ranges property
>> arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: pinctrl@1001f000: 'boot-mode-hog' does not match any of the regexes: '-pins$', 'pinctrl-[0-9]+'
   	from schema $id: http://devicetree.org/schemas/pinctrl/mediatek,mt7986-pinctrl.yaml#
   arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: crypto@10320000: interrupts: [[0, 116, 4], [0, 117, 4], [0, 118, 4], [0, 119, 4]] is too short
   	from schema $id: http://devicetree.org/schemas/crypto/inside-secure,safexcel.yaml#
   arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: crypto@10320000: interrupt-names: ['ring0', 'ring1', 'ring2', 'ring3'] is too short
   	from schema $id: http://devicetree.org/schemas/crypto/inside-secure,safexcel.yaml#
   arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: switch@31: 'interrupts' is a dependency of 'interrupt-controller'
   	from schema $id: http://devicetree.org/schemas/net/dsa/mediatek,mt7530.yaml#
Krzysztof Kozlowski July 4, 2024, 7:41 a.m. UTC | #2
On 03/07/2024 13:39, kernel test robot wrote:
> Hi Leith,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on robh/for-next]
> [also build test WARNING on linus/master v6.10-rc6 next-20240703]

> dtcheck warnings: (new ones prefixed by >>)
>    arch/arm64/boot/dts/mediatek/mt7986a.dtsi:431.19-445.5: Warning (simple_bus_reg): /soc/t-phy: missing or empty reg/ranges property
>>> arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: pinctrl@1001f000: 'boot-mode-hog' does not match any of the regexes: '-pins$', 'pinctrl-[0-9]+'
>    	from schema $id: http://devicetree.org/schemas/pinctrl/mediatek,mt7986-pinctrl.yaml#
>    arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: crypto@10320000: interrupts: [[0, 116, 4], [0, 117, 4], [0, 118, 4], [0, 119, 4]] is too short
>    	from schema $id: http://devicetree.org/schemas/crypto/inside-secure,safexcel.yaml#
>    arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: crypto@10320000: interrupt-names: ['ring0', 'ring1', 'ring2', 'ring3'] is too short
>    	from schema $id: http://devicetree.org/schemas/crypto/inside-secure,safexcel.yaml#
>    arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: switch@31: 'interrupts' is a dependency of 'interrupt-controller'
>    	from schema $id: http://devicetree.org/schemas/net/dsa/mediatek,mt7530.yaml#


Is this one more noise / false positive report?

Intel, please filter your emails only to relevant reports. I am really
getting tired of them.

Best regards,
Krzysztof
Philip Li July 4, 2024, 8:56 a.m. UTC | #3
On Thu, Jul 04, 2024 at 09:41:13AM +0200, Krzysztof Kozlowski wrote:
> On 03/07/2024 13:39, kernel test robot wrote:
> > Hi Leith,
> > 
> > kernel test robot noticed the following build warnings:
> > 
> > [auto build test WARNING on robh/for-next]
> > [also build test WARNING on linus/master v6.10-rc6 next-20240703]
> 
> > dtcheck warnings: (new ones prefixed by >>)
> >    arch/arm64/boot/dts/mediatek/mt7986a.dtsi:431.19-445.5: Warning (simple_bus_reg): /soc/t-phy: missing or empty reg/ranges property
> >>> arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: pinctrl@1001f000: 'boot-mode-hog' does not match any of the regexes: '-pins$', 'pinctrl-[0-9]+'
> >    	from schema $id: http://devicetree.org/schemas/pinctrl/mediatek,mt7986-pinctrl.yaml#
> >    arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: crypto@10320000: interrupts: [[0, 116, 4], [0, 117, 4], [0, 118, 4], [0, 119, 4]] is too short
> >    	from schema $id: http://devicetree.org/schemas/crypto/inside-secure,safexcel.yaml#
> >    arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: crypto@10320000: interrupt-names: ['ring0', 'ring1', 'ring2', 'ring3'] is too short
> >    	from schema $id: http://devicetree.org/schemas/crypto/inside-secure,safexcel.yaml#
> >    arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: switch@31: 'interrupts' is a dependency of 'interrupt-controller'
> >    	from schema $id: http://devicetree.org/schemas/net/dsa/mediatek,mt7530.yaml#
> 
> 
> Is this one more noise / false positive report?
> 
> Intel, please filter your emails only to relevant reports. I am really
> getting tired of them.

Got it, sorry for the noise. We will configure the bot to avoid sending
false reports in future.

> 
> Best regards,
> Krzysztof
> 
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
index 951612ea1e66..2cccbec39d34 100644
--- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
@@ -235,6 +235,13 @@  &pcie_phy {
 };
 
 &pio {
+	boot_mode_hog: boot-mode-hog {
+		gpio-hog;
+		gpios = <5 GPIO_ACTIVE_HIGH>,
+			<6 GPIO_ACTIVE_HIGH>;
+		input;
+	};
+
 	i2c_pins: i2c-pins {
 		mux {
 			function = "i2c";