mtd: rawnand: brcmnand: Support write protection setting from dts
authorWilliam Zhang <william.zhang@broadcom.com>
Fri, 23 Feb 2024 03:47:58 +0000 (19:47 -0800)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 14 Mar 2024 23:04:50 +0000 (00:04 +0100)
commit8e7daa85641c9559c113f6b217bdc923397de77c
treeb089a14e3b2e068acdc9c74a2c79944d31c3c212
parent546e425991205f59281e160a0d0daed47b7ca9b3
mtd: rawnand: brcmnand: Support write protection setting from dts

The write protection feature is controlled by the module parameter wp_on
with default set to enabled. But not all the board use this feature
especially in BCMBCA broadband board. And module parameter is not
sufficient as different board can have different option.  Add a device
tree property and allow this feature to be configured through the board
dts on per board basis.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Kamal Dasu <kamal.dasu@broadcom.com>
Reviewed-by: David Regan <dregan@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240223034758.13753-14-william.zhang@broadcom.com
drivers/mtd/nand/raw/brcmnand/brcmnand.c